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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73b455031d418a9054224f751e2ed97b864b731a8d79be0de15cd180080994a1
|
4
|
+
data.tar.gz: f6612739658ff3ba4e538476fbb1259d58257a8247bf5305f7c67329011a61de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
22
|
-
|
23
|
-
|
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
|
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
|
-
|
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
|