fastlane-plugin-rm_derived_data 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 607791a8bfa4bed536f6c7c968e77a0c7c05f699bb2d8d4a30bdb31928c7b1d0
4
- data.tar.gz: f473fa8888b6239b2eef4f56ffce9131cbad075f60aa0f950bd94c9afbb1f267
3
+ metadata.gz: 73b455031d418a9054224f751e2ed97b864b731a8d79be0de15cd180080994a1
4
+ data.tar.gz: f6612739658ff3ba4e538476fbb1259d58257a8247bf5305f7c67329011a61de
5
5
  SHA512:
6
- metadata.gz: d6a1522d1da3e11a3194b35d86854557b9aa9443e15238a5eb92b6be8ed6b063eed91042331f01171acd47b170a1f46aee7fd454032294fdfe2b1ecf634fec84
7
- data.tar.gz: 0f0eeaa80bceb469e02974f5cc6c6577b5c425e516a1d2ad799ad8f220594f358dbab7ed9a1e88a8850c53a7a098079bf7a19a5c0d4e3f4389c419f017b39be3
6
+ metadata.gz: f7fa8806f174d85331e9d729aa5f43aabd615d9b254687acb400d1666b24c3383a8b1897596a101c2fc73361d1ffd1748294caebf4a9a05ee348d87add15dc24
7
+ data.tar.gz: 95398d601a98dc369644540dbe3a91bcfbf3a7e0ec605d743d731385f349961673522c3982c0fbf329458b5a76e06310073e7ce4cab15a33a891cbc7cee30865
data/README.md CHANGED
@@ -18,9 +18,31 @@ de
18
18
 
19
19
  ## Example
20
20
 
21
- Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
22
-
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
21
+ ```ruby
22
+ rm_derived_data(derived_data: '/Users/xiongzenghui/Library/Developer/Xcode/DerivedData')
23
+
24
+ rm_derived_data(
25
+ xcodeproj: '/Users/xiongzenghui/Desktop/DemoHaha/DemoHaha.xcodeproj',
26
+ scheme: 'DemoHaha'
27
+ )
28
+
29
+ rm_derived_data(
30
+ xcodeproj: '/Users/xiongzenghui/Desktop/DemoHaha/DemoHaha.xcodeproj',
31
+ scheme: 'DemoHaha',
32
+ module_cache_noindex: true
33
+ )
34
+
35
+ rm_derived_data(
36
+ workspace: '/Users/xiongzenghui/ios_projects/osee2unified/osee2unified/osee2unified.xcworkspace',
37
+ scheme: 'osee2unifiedRelease'
38
+ )
39
+
40
+ rm_derived_data(
41
+ workspace: '/Users/xiongzenghui/ios_projects/osee2unified/osee2unified/osee2unified.xcworkspace',
42
+ scheme: 'osee2unifiedRelease',
43
+ module_cache_noindex: true
44
+ )
45
+ ```
24
46
 
25
47
  ## Run tests for this plugin
26
48
 
@@ -7,7 +7,6 @@ module Fastlane
7
7
  def self.run(params)
8
8
  require 'json'
9
9
  require 'fileutils'
10
- UI.important("[RmDerivedDataAction] begin ... 🔵")
11
10
 
12
11
  derived_data = params[:derived_data]
13
12
  xcodeproj = params[:xcodeproj]
@@ -26,12 +25,6 @@ module Fastlane
26
25
  return true
27
26
  end
28
27
 
29
- if module_cache_noindex && (!xcodeproj && !workspace)
30
- FileUtils.rm_rf(module_cache_noindex)
31
- UI.success("[RmDerivedDataAction] remove ModuleCache.noindex success ✅")
32
- return true
33
- end
34
-
35
28
  if !xcodeproj && !workspace
36
29
  UI.user_error!("xcodeproj or workspace must give one ❌")
37
30
  end
@@ -54,17 +47,21 @@ module Fastlane
54
47
  return false
55
48
  end
56
49
 
57
- ## DerivedData/DemoHaha-aojcutdqufwalmdppnjqhcygatiz
58
50
  build_settings = arr[0]['buildSettings']
51
+ # UI.success(build_settings)
52
+
53
+ ## DerivedData/DemoHaha-aojcutdqufwalmdppnjqhcygatiz
59
54
  build_root = build_settings['BUILD_ROOT']
60
55
  build_root = build_root.gsub('/Build/Products', '')
61
- UI.important("DerivedData=#{build_root}")
56
+ UI.important("[RmDerivedDataAction] remove DerivedData: #{build_root} ... 🔵")
62
57
  FileUtils.rm_rf(build_root)
63
58
  UI.success("[RmDerivedDataAction] remove DerivedData success ✅")
64
59
 
65
60
  ## DerivedData/ModuleCache.noindex
66
61
  if module_cache_noindex
67
- FileUtils.rm_rf(module_cache_noindex)
62
+ module_cache_noindex_dir = build_settings['MODULE_CACHE_DIR']
63
+ UI.important("[RmDerivedDataAction] remove ModuleCache.noindex: #{module_cache_noindex_dir} ... 🔵")
64
+ FileUtils.rm_rf(module_cache_noindex_dir)
68
65
  UI.success("[RmDerivedDataAction] remove ModuleCache.noindex success ✅")
69
66
  end
70
67
 
@@ -118,7 +115,9 @@ module Fastlane
118
115
  FastlaneCore::ConfigItem.new(
119
116
  key: :module_cache_noindex,
120
117
  description: '~/Library/Developer/Xcode/DerivedData/ModuleCache.noindex',
121
- optional: true
118
+ optional: true,
119
+ is_string: false,
120
+ default_value: false
122
121
  )
123
122
  ]
124
123
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module RmDerivedData
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-rm_derived_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - xiongzenghui