fastlane 2.189.0 → 2.190.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +92 -92
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +1 -1
- data/fastlane/lib/fastlane/actions/bundle_install.rb +13 -1
- data/fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb +25 -1
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +2 -2
- data/fastlane/lib/fastlane/actions/zip.rb +86 -22
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +1 -1
- data/fastlane/swift/Fastlane.swift +44 -10
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +1 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +3 -3
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +11 -4
- data/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +1 -0
- data/scan/lib/scan/xcpretty_reporter_options_generator.rb +1 -1
- data/sigh/lib/sigh/options.rb +2 -1
- data/spaceship/lib/spaceship/client.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/models/user.rb +17 -3
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +26 -5
- data/spaceship/lib/spaceship/connect_api/testflight/client.rb +3 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +39 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +2 -1
- data/spaceship/lib/spaceship/connect_api/tunes/client.rb +3 -0
- data/spaceship/lib/spaceship/connect_api/users/client.rb +3 -0
- data/spaceship/lib/spaceship/connect_api/users/users.rb +24 -2
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +3 -0
- metadata +21 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8705b34d3c2ba652057cd97cf7482e1490cfdfdd26650ee1cb001b3e2d55553c
|
4
|
+
data.tar.gz: 4fc0b307f940f973ea7d9a70fe88ef567a97fcb9398ae9dfac52d9c4041c58c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8421768a3ca7030a72a000a3df67a864b7461ee3e221c1e8e91d061aa2d83eac121ed9781e75fc81e2f1e11d822309318d2f0f5aea52cfdd7ce5180c745e359f
|
7
|
+
data.tar.gz: bf7ca0c1eb8f5daed3a4ea7a44ffad3898535e173805f342a3590440a248cc9d5bbb4b6a9edea98af191d20cb740316ba9b5b044a75b1c0109ac1923a5df6326
|
data/README.md
CHANGED
@@ -35,11 +35,23 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
35
35
|
<!-- This table is regenerated and resorted on each release -->
|
36
36
|
<table id='team'>
|
37
37
|
<tr>
|
38
|
-
<td id='
|
39
|
-
<a href='https://github.com/
|
40
|
-
<img src='https://github.com/
|
38
|
+
<td id='luka-mirosevic'>
|
39
|
+
<a href='https://github.com/lmirosevic'>
|
40
|
+
<img src='https://github.com/lmirosevic.png' width='140px;'>
|
41
41
|
</a>
|
42
|
-
<h4 align='center'><a href='https://twitter.com/
|
42
|
+
<h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
|
43
|
+
</td>
|
44
|
+
<td id='aaron-brager'>
|
45
|
+
<a href='https://github.com/getaaron'>
|
46
|
+
<img src='https://github.com/getaaron.png' width='140px;'>
|
47
|
+
</a>
|
48
|
+
<h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
|
49
|
+
</td>
|
50
|
+
<td id='fumiya-nakamura'>
|
51
|
+
<a href='https://github.com/nafu'>
|
52
|
+
<img src='https://github.com/nafu.png' width='140px;'>
|
53
|
+
</a>
|
54
|
+
<h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
|
43
55
|
</td>
|
44
56
|
<td id='satoshi-namai'>
|
45
57
|
<a href='https://github.com/ainame'>
|
@@ -47,17 +59,25 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
47
59
|
</a>
|
48
60
|
<h4 align='center'><a href='https://twitter.com/ainame'>Satoshi Namai</a></h4>
|
49
61
|
</td>
|
62
|
+
<td id='manish-rathi'>
|
63
|
+
<a href='https://github.com/crazymanish'>
|
64
|
+
<img src='https://github.com/crazymanish.png' width='140px;'>
|
65
|
+
</a>
|
66
|
+
<h4 align='center'><a href='https://twitter.com/iammanishrathi'>Manish Rathi</a></h4>
|
67
|
+
</td>
|
68
|
+
</tr>
|
69
|
+
<tr>
|
50
70
|
<td id='andrew-mcburney'>
|
51
71
|
<a href='https://github.com/armcburney'>
|
52
72
|
<img src='https://github.com/armcburney.png' width='140px;'>
|
53
73
|
</a>
|
54
74
|
<h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
|
55
75
|
</td>
|
56
|
-
<td id='
|
57
|
-
<a href='https://github.com/
|
58
|
-
<img src='https://github.com/
|
76
|
+
<td id='kohki-miki'>
|
77
|
+
<a href='https://github.com/giginet'>
|
78
|
+
<img src='https://github.com/giginet.png' width='140px;'>
|
59
79
|
</a>
|
60
|
-
<h4 align='center'><a href='https://twitter.com/
|
80
|
+
<h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
|
61
81
|
</td>
|
62
82
|
<td id='olivier-halligon'>
|
63
83
|
<a href='https://github.com/AliSoftware'>
|
@@ -65,31 +85,43 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
65
85
|
</a>
|
66
86
|
<h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
|
67
87
|
</td>
|
88
|
+
<td id='danielle-tomlinson'>
|
89
|
+
<a href='https://github.com/endocrimes'>
|
90
|
+
<img src='https://github.com/endocrimes.png' width='140px;'>
|
91
|
+
</a>
|
92
|
+
<h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
|
93
|
+
</td>
|
94
|
+
<td id='jorge-revuelta-h'>
|
95
|
+
<a href='https://github.com/minuscorp'>
|
96
|
+
<img src='https://github.com/minuscorp.png' width='140px;'>
|
97
|
+
</a>
|
98
|
+
<h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
|
99
|
+
</td>
|
68
100
|
</tr>
|
69
101
|
<tr>
|
70
|
-
<td id='
|
71
|
-
<a href='https://github.com/
|
72
|
-
<img src='https://github.com/
|
102
|
+
<td id='manu-wallner'>
|
103
|
+
<a href='https://github.com/milch'>
|
104
|
+
<img src='https://github.com/milch.png' width='140px;'>
|
73
105
|
</a>
|
74
|
-
<h4 align='center'><a href='https://twitter.com/
|
106
|
+
<h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
|
75
107
|
</td>
|
76
|
-
<td id='
|
77
|
-
<a href='https://github.com/
|
78
|
-
<img src='https://github.com/
|
108
|
+
<td id='matthew-ellis'>
|
109
|
+
<a href='https://github.com/matthewellis'>
|
110
|
+
<img src='https://github.com/matthewellis.png' width='140px;'>
|
79
111
|
</a>
|
80
|
-
<h4 align='center'><a href='https://twitter.com/
|
112
|
+
<h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
|
81
113
|
</td>
|
82
|
-
<td id='
|
83
|
-
<a href='https://github.com/
|
84
|
-
<img src='https://github.com/
|
114
|
+
<td id='felix-krause'>
|
115
|
+
<a href='https://github.com/KrauseFx'>
|
116
|
+
<img src='https://github.com/KrauseFx.png' width='140px;'>
|
85
117
|
</a>
|
86
|
-
<h4 align='center'><a href='https://twitter.com/
|
118
|
+
<h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
|
87
119
|
</td>
|
88
|
-
<td id='
|
89
|
-
<a href='https://github.com/
|
90
|
-
<img src='https://github.com/
|
120
|
+
<td id='maksym-grebenets'>
|
121
|
+
<a href='https://github.com/mgrebenets'>
|
122
|
+
<img src='https://github.com/mgrebenets.png' width='140px;'>
|
91
123
|
</a>
|
92
|
-
<h4 align='center'><a href='https://twitter.com/
|
124
|
+
<h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
|
93
125
|
</td>
|
94
126
|
<td id='helmut-januschka'>
|
95
127
|
<a href='https://github.com/hjanuschka'>
|
@@ -99,99 +131,67 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
99
131
|
</td>
|
100
132
|
</tr>
|
101
133
|
<tr>
|
102
|
-
<td id='
|
103
|
-
<a href='https://github.com/
|
104
|
-
<img src='https://github.com/
|
134
|
+
<td id='jimmy-dee'>
|
135
|
+
<a href='https://github.com/jdee'>
|
136
|
+
<img src='https://github.com/jdee.png' width='140px;'>
|
105
137
|
</a>
|
106
|
-
<h4 align='center'
|
138
|
+
<h4 align='center'>Jimmy Dee</h4>
|
107
139
|
</td>
|
108
|
-
<td id='
|
109
|
-
<a href='https://github.com/
|
110
|
-
<img src='https://github.com/
|
140
|
+
<td id='joshua-liebowitz'>
|
141
|
+
<a href='https://github.com/taquitos'>
|
142
|
+
<img src='https://github.com/taquitos.png' width='140px;'>
|
111
143
|
</a>
|
112
|
-
<h4 align='center'><a href='https://twitter.com/
|
144
|
+
<h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
|
113
145
|
</td>
|
114
|
-
<td id='
|
115
|
-
<a href='https://github.com/
|
116
|
-
<img src='https://github.com/
|
146
|
+
<td id='jérôme-lacoste'>
|
147
|
+
<a href='https://github.com/lacostej'>
|
148
|
+
<img src='https://github.com/lacostej.png' width='140px;'>
|
117
149
|
</a>
|
118
|
-
<h4 align='center'><a href='https://twitter.com/
|
150
|
+
<h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
|
119
151
|
</td>
|
120
|
-
<td id='
|
121
|
-
<a href='https://github.com/
|
122
|
-
<img src='https://github.com/
|
152
|
+
<td id='stefan-natchev'>
|
153
|
+
<a href='https://github.com/snatchev'>
|
154
|
+
<img src='https://github.com/snatchev.png' width='140px;'>
|
123
155
|
</a>
|
124
|
-
<h4 align='center'><a href='https://twitter.com/
|
156
|
+
<h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
|
125
157
|
</td>
|
126
|
-
<td id='
|
127
|
-
<a href='https://github.com/
|
128
|
-
<img src='https://github.com/
|
158
|
+
<td id='iulian-onofrei'>
|
159
|
+
<a href='https://github.com/revolter'>
|
160
|
+
<img src='https://github.com/revolter.png' width='140px;'>
|
129
161
|
</a>
|
130
|
-
<h4 align='center'><a href='https://twitter.com/
|
162
|
+
<h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
|
131
163
|
</td>
|
132
164
|
</tr>
|
133
165
|
<tr>
|
134
|
-
<td id='kohki-miki'>
|
135
|
-
<a href='https://github.com/giginet'>
|
136
|
-
<img src='https://github.com/giginet.png' width='140px;'>
|
137
|
-
</a>
|
138
|
-
<h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
|
139
|
-
</td>
|
140
|
-
<td id='daniel-jankowski'>
|
141
|
-
<a href='https://github.com/mollyIV'>
|
142
|
-
<img src='https://github.com/mollyIV.png' width='140px;'>
|
143
|
-
</a>
|
144
|
-
<h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
|
145
|
-
</td>
|
146
|
-
<td id='aaron-brager'>
|
147
|
-
<a href='https://github.com/getaaron'>
|
148
|
-
<img src='https://github.com/getaaron.png' width='140px;'>
|
149
|
-
</a>
|
150
|
-
<h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
|
151
|
-
</td>
|
152
166
|
<td id='roger-oba'>
|
153
167
|
<a href='https://github.com/rogerluan'>
|
154
168
|
<img src='https://github.com/rogerluan.png' width='140px;'>
|
155
169
|
</a>
|
156
170
|
<h4 align='center'><a href='https://twitter.com/rogerluan_'>Roger Oba</a></h4>
|
157
171
|
</td>
|
158
|
-
<td id='
|
159
|
-
<a href='https://github.com/
|
160
|
-
<img src='https://github.com/
|
161
|
-
</a>
|
162
|
-
<h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
|
163
|
-
</td>
|
164
|
-
</tr>
|
165
|
-
<tr>
|
166
|
-
<td id='manu-wallner'>
|
167
|
-
<a href='https://github.com/milch'>
|
168
|
-
<img src='https://github.com/milch.png' width='140px;'>
|
169
|
-
</a>
|
170
|
-
<h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
|
171
|
-
</td>
|
172
|
-
<td id='danielle-tomlinson'>
|
173
|
-
<a href='https://github.com/endocrimes'>
|
174
|
-
<img src='https://github.com/endocrimes.png' width='140px;'>
|
172
|
+
<td id='daniel-jankowski'>
|
173
|
+
<a href='https://github.com/mollyIV'>
|
174
|
+
<img src='https://github.com/mollyIV.png' width='140px;'>
|
175
175
|
</a>
|
176
|
-
<h4 align='center'><a href='https://twitter.com/
|
176
|
+
<h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
|
177
177
|
</td>
|
178
|
-
<td id='
|
179
|
-
<a href='https://github.com/
|
180
|
-
<img src='https://github.com/
|
178
|
+
<td id='josh-holtz'>
|
179
|
+
<a href='https://github.com/joshdholtz'>
|
180
|
+
<img src='https://github.com/joshdholtz.png' width='140px;'>
|
181
181
|
</a>
|
182
|
-
<h4 align='center'><a href='https://twitter.com/
|
182
|
+
<h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
|
183
183
|
</td>
|
184
|
-
<td id='
|
185
|
-
<a href='https://github.com/
|
186
|
-
<img src='https://github.com/
|
184
|
+
<td id='max-ott'>
|
185
|
+
<a href='https://github.com/max-ott'>
|
186
|
+
<img src='https://github.com/max-ott.png' width='140px;'>
|
187
187
|
</a>
|
188
|
-
<h4 align='center'><a href='https://twitter.com/
|
188
|
+
<h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
|
189
189
|
</td>
|
190
|
-
<td id='
|
191
|
-
<a href='https://github.com/
|
192
|
-
<img src='https://github.com/
|
190
|
+
<td id='jan-piotrowski'>
|
191
|
+
<a href='https://github.com/janpio'>
|
192
|
+
<img src='https://github.com/janpio.png' width='140px;'>
|
193
193
|
</a>
|
194
|
-
<h4 align='center'>
|
194
|
+
<h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
|
195
195
|
</td>
|
196
196
|
</tr>
|
197
197
|
</table>
|
@@ -80,7 +80,7 @@ module Fastlane
|
|
80
80
|
env_name: "APP_STORE_CONNECT_API_KEY_DURATION",
|
81
81
|
description: "The token session duration",
|
82
82
|
optional: true,
|
83
|
-
default_value: Spaceship::ConnectAPI::Token::
|
83
|
+
default_value: Spaceship::ConnectAPI::Token::DEFAULT_TOKEN_DURATION,
|
84
84
|
type: Integer,
|
85
85
|
verify_block: proc do |value|
|
86
86
|
UI.user_error!("The duration can't be more than 1200 (20 minutes) and the value entered was '#{value}'") unless value <= 1200
|
@@ -24,6 +24,8 @@ module Fastlane
|
|
24
24
|
cmd << "--trust-policy" if params[:trust_policy]
|
25
25
|
cmd << "--without #{params[:without]}" if params[:without]
|
26
26
|
cmd << "--with #{params[:with]}" if params[:with]
|
27
|
+
cmd << "--frozen" if params[:frozen]
|
28
|
+
cmd << "--redownload" if params[:redownload]
|
27
29
|
|
28
30
|
return sh(cmd.join(' '))
|
29
31
|
else
|
@@ -146,7 +148,17 @@ module Fastlane
|
|
146
148
|
FastlaneCore::ConfigItem.new(key: :with,
|
147
149
|
env_name: "FL_BUNDLE_INSTALL_WITH",
|
148
150
|
description: "Include gems that are part of the specified named group",
|
149
|
-
optional: true)
|
151
|
+
optional: true),
|
152
|
+
FastlaneCore::ConfigItem.new(key: :frozen,
|
153
|
+
env_name: "FL_BUNDLE_INSTALL_FROZEN",
|
154
|
+
description: "Don't allow the Gemfile.lock to be updated after install",
|
155
|
+
type: Boolean,
|
156
|
+
default_value: false),
|
157
|
+
FastlaneCore::ConfigItem.new(key: :redownload,
|
158
|
+
env_name: "FL_BUNDLE_INSTALL_REDOWNLOAD",
|
159
|
+
description: "Force download every gem, even if the required versions are already available locally",
|
160
|
+
type: Boolean,
|
161
|
+
default_value: false)
|
150
162
|
]
|
151
163
|
end
|
152
164
|
end
|
@@ -7,6 +7,10 @@ module Fastlane
|
|
7
7
|
cmd = ['pod cache clean']
|
8
8
|
|
9
9
|
cmd << params[:name].to_s if params[:name]
|
10
|
+
cmd << '--no-ansi' if params[:no_ansi]
|
11
|
+
cmd << '--verbose' if params[:verbose]
|
12
|
+
cmd << '--silent' if params[:silent]
|
13
|
+
cmd << '--allow-root' if params[:allow_root]
|
10
14
|
cmd << '--all'
|
11
15
|
|
12
16
|
Actions.sh(cmd.join(' '))
|
@@ -24,7 +28,27 @@ module Fastlane
|
|
24
28
|
optional: true,
|
25
29
|
verify_block: proc do |value|
|
26
30
|
UI.user_error!("You must specify pod name which should be removed from cache") if value.to_s.empty?
|
27
|
-
end)
|
31
|
+
end),
|
32
|
+
FastlaneCore::ConfigItem.new(key: :no_ansi,
|
33
|
+
env_name: "FL_CLEAN_COCOAPODS_CACHE_NO_ANSI",
|
34
|
+
description: "Show output without ANSI codes",
|
35
|
+
type: Boolean,
|
36
|
+
default_value: false),
|
37
|
+
FastlaneCore::ConfigItem.new(key: :verbose,
|
38
|
+
env_name: "FL_CLEAN_COCOAPODS_CACHE_VERBOSE",
|
39
|
+
description: "Show more debugging information",
|
40
|
+
type: Boolean,
|
41
|
+
default_value: false),
|
42
|
+
FastlaneCore::ConfigItem.new(key: :silent,
|
43
|
+
env_name: "FL_CLEAN_COCOAPODS_CACHE_SILENT",
|
44
|
+
description: "Show nothing",
|
45
|
+
type: Boolean,
|
46
|
+
default_value: false),
|
47
|
+
FastlaneCore::ConfigItem.new(key: :allow_root,
|
48
|
+
env_name: "FL_CLEAN_COCOAPODS_CACHE_ALLOW_ROOT",
|
49
|
+
description: "Allows CocoaPods to run as root",
|
50
|
+
type: Boolean,
|
51
|
+
default_value: false)
|
28
52
|
]
|
29
53
|
end
|
30
54
|
|
@@ -247,7 +247,7 @@ new CleanStatusBar()
|
|
247
247
|
|
248
248
|
# Advanced _screengrab_
|
249
249
|
|
250
|
-
<details>
|
250
|
+
<details markdown="1">
|
251
251
|
<summary>Launch Arguments</summary>
|
252
252
|
|
253
253
|
You can provide additional arguments to your test cases on launch. These strings will be available in your tests through `InstrumentationRegistry.getArguments()`.
|
@@ -277,7 +277,7 @@ if (extras != null) {
|
|
277
277
|
```
|
278
278
|
</details>
|
279
279
|
|
280
|
-
<details>
|
280
|
+
<details markdown="1">
|
281
281
|
<summary>Detecting screengrab at runtime</summary>
|
282
282
|
|
283
283
|
For some apps, it is helpful to know when _screengrab_ is running so that you can display specific data for your screenshots. For iOS fastlane users, this is much like "FASTLANE_SNAPSHOT". In order to do this, you'll need to have at least two product flavors of your app.
|
@@ -104,7 +104,7 @@ deliver(
|
|
104
104
|
|
105
105
|
## More options
|
106
106
|
|
107
|
-
<details>
|
107
|
+
<details markdown="1">
|
108
108
|
<summary>View all available options and their valid values</summary>
|
109
109
|
|
110
110
|
## Available options
|
@@ -497,7 +497,7 @@ Key | Editable While Live | Directory | Filename | Deprecated Filename
|
|
497
497
|
|
498
498
|
## Reference
|
499
499
|
|
500
|
-
<details>
|
500
|
+
<details markdown="1">
|
501
501
|
<summary>View all available categories, etc.</summary>
|
502
502
|
|
503
503
|
### Available Categories
|
@@ -1,35 +1,75 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
3
|
class ZipAction < Action
|
4
|
-
|
5
|
-
|
4
|
+
class Runner
|
5
|
+
attr_reader :output_path, :path, :verbose, :password, :symlinks, :include, :exclude
|
6
|
+
|
7
|
+
def initialize(params)
|
8
|
+
@output_path = File.expand_path(params[:output_path] || params[:path])
|
9
|
+
@path = params[:path]
|
10
|
+
@verbose = params[:verbose]
|
11
|
+
@password = params[:password]
|
12
|
+
@symlinks = params[:symlinks]
|
13
|
+
@include = params[:include]
|
14
|
+
@exclude = params[:exclude]
|
15
|
+
|
16
|
+
@output_path += ".zip" unless @output_path.end_with?(".zip")
|
17
|
+
end
|
6
18
|
|
7
|
-
|
19
|
+
def run
|
20
|
+
UI.message("Compressing #{path}...")
|
8
21
|
|
9
|
-
|
22
|
+
create_output_dir
|
23
|
+
run_zip_command
|
10
24
|
|
11
|
-
|
12
|
-
|
13
|
-
absolute_output_path += ".zip"
|
25
|
+
UI.success("Successfully generated zip file at path '#{output_path}'")
|
26
|
+
output_path
|
14
27
|
end
|
15
28
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
zip_options = params[:verbose] ? "r" : "rq"
|
21
|
-
zip_options += "y" if params[:symlinks]
|
29
|
+
def create_output_dir
|
30
|
+
output_dir = File.expand_path("..", output_path)
|
31
|
+
FileUtils.mkdir_p(output_dir)
|
32
|
+
end
|
22
33
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
Actions.sh("zip -#{zip_options} #{absolute_output_path.shellescape} #{File.basename(params[:path]).shellescape}")
|
34
|
+
def run_zip_command
|
35
|
+
# The 'zip' command archives relative to the working directory, chdir to produce expected results relative to `path`
|
36
|
+
Dir.chdir(File.expand_path("..", path)) do
|
37
|
+
Actions.sh(zip_command)
|
28
38
|
end
|
29
39
|
end
|
30
40
|
|
31
|
-
|
32
|
-
|
41
|
+
def zip_command
|
42
|
+
zip_options = verbose ? "r" : "rq"
|
43
|
+
zip_options += "y" if symlinks
|
44
|
+
|
45
|
+
command = ["zip", "-#{zip_options}"]
|
46
|
+
|
47
|
+
if password
|
48
|
+
command << "-P"
|
49
|
+
command << password
|
50
|
+
end
|
51
|
+
|
52
|
+
# The zip command is executed from the paths **parent** directory, as a result we use just the basename, which is the file or folder within
|
53
|
+
basename = File.basename(path)
|
54
|
+
|
55
|
+
command << output_path
|
56
|
+
command << basename
|
57
|
+
|
58
|
+
unless include.empty?
|
59
|
+
command << "-i"
|
60
|
+
command += include.map { |path| File.join(basename, path) }
|
61
|
+
end
|
62
|
+
|
63
|
+
unless exclude.empty?
|
64
|
+
command << "-x"
|
65
|
+
command += exclude.map { |path| File.join(basename, path) }
|
66
|
+
end
|
67
|
+
|
68
|
+
command
|
69
|
+
end
|
70
|
+
end
|
71
|
+
def self.run(params)
|
72
|
+
Runner.new(params).run
|
33
73
|
end
|
34
74
|
|
35
75
|
#####################################################
|
@@ -46,7 +86,8 @@ module Fastlane
|
|
46
86
|
env_name: "FL_ZIP_PATH",
|
47
87
|
description: "Path to the directory or file to be zipped",
|
48
88
|
verify_block: proc do |value|
|
49
|
-
|
89
|
+
path = File.expand_path(value)
|
90
|
+
UI.user_error!("Couldn't find file/folder at path '#{path}'") unless File.exist?(path)
|
50
91
|
end),
|
51
92
|
FastlaneCore::ConfigItem.new(key: :output_path,
|
52
93
|
env_name: "FL_ZIP_OUTPUT_NAME",
|
@@ -67,7 +108,19 @@ module Fastlane
|
|
67
108
|
description: "Store symbolic links as such in the zip archive",
|
68
109
|
optional: true,
|
69
110
|
type: Boolean,
|
70
|
-
default_value: false)
|
111
|
+
default_value: false),
|
112
|
+
FastlaneCore::ConfigItem.new(key: :include,
|
113
|
+
env_name: "FL_ZIP_INCLUDE",
|
114
|
+
description: "Array of paths or patterns to include",
|
115
|
+
optional: true,
|
116
|
+
type: Array,
|
117
|
+
default_value: []),
|
118
|
+
FastlaneCore::ConfigItem.new(key: :exclude,
|
119
|
+
env_name: "FL_ZIP_EXCLUDE",
|
120
|
+
description: "Array of paths or patterns to exclude",
|
121
|
+
optional: true,
|
122
|
+
type: Array,
|
123
|
+
default_value: [])
|
71
124
|
]
|
72
125
|
end
|
73
126
|
|
@@ -88,6 +141,17 @@ module Fastlane
|
|
88
141
|
output_path: "Latest.app.zip",
|
89
142
|
verbose: false,
|
90
143
|
symlinks: true
|
144
|
+
)',
|
145
|
+
'zip(
|
146
|
+
path: "./",
|
147
|
+
output_path: "Source Code.zip",
|
148
|
+
exclude: [".git/*"]
|
149
|
+
)',
|
150
|
+
'zip(
|
151
|
+
path: "./",
|
152
|
+
output_path: "Swift Code.zip",
|
153
|
+
include: ["**/*.swift"],
|
154
|
+
exclude: ["Package.swift", "vendor/*", "Pods/*"]
|
91
155
|
)'
|
92
156
|
]
|
93
157
|
end
|