fastlane 2.161.0 → 2.166.0
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 +5 -5
- data/README.md +78 -78
- data/cert/lib/cert/options.rb +28 -1
- data/cert/lib/cert/runner.rb +51 -34
- data/deliver/lib/deliver/.upload_screenshots.rb.swp +0 -0
- data/deliver/lib/deliver/app_screenshot_iterator.rb +4 -4
- data/deliver/lib/deliver/module.rb +2 -0
- data/deliver/lib/deliver/options.rb +5 -5
- data/deliver/lib/deliver/queue_worker.rb +14 -29
- data/deliver/lib/deliver/upload_metadata.rb +20 -5
- data/deliver/lib/deliver/upload_screenshots.rb +28 -13
- data/fastlane/lib/fastlane/actions/.download_dsyms.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/actions_helper.rb +1 -1
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +39 -3
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +9 -0
- data/fastlane/lib/fastlane/actions/appledoc.rb +1 -1
- data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +1 -0
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +5 -1
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +9 -0
- data/fastlane/lib/fastlane/actions/get_certificates.rb +1 -0
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +1 -0
- data/fastlane/lib/fastlane/actions/import_from_git.rb +9 -1
- data/fastlane/lib/fastlane/actions/is_ci.rb +1 -1
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +15 -0
- data/fastlane/lib/fastlane/actions/register_device.rb +46 -5
- data/fastlane/lib/fastlane/actions/register_devices.rb +50 -16
- data/fastlane/lib/fastlane/actions/set_changelog.rb +31 -3
- data/fastlane/lib/fastlane/actions/sync_code_signing.rb +1 -0
- data/fastlane/lib/fastlane/actions/update_fastlane.rb +24 -8
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +3 -2
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +1 -1
- data/fastlane/lib/fastlane/fast_file.rb +74 -23
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +1 -0
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +1 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +4 -4
- data/fastlane/swift/Fastlane.swift +119 -23
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/LaneFileProtocol.swift +15 -19
- data/fastlane/swift/MainProcess.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +20 -4
- 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 +5 -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/main.swift +1 -1
- data/fastlane_core/lib/fastlane_core/analytics/analytics_session.rb +6 -7
- data/fastlane_core/lib/fastlane_core/device_manager.rb +8 -4
- data/fastlane_core/lib/fastlane_core/helper.rb +10 -2
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +3 -3
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +3 -3
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +2 -2
- data/match/lib/match/generator.rb +6 -1
- data/match/lib/match/importer.rb +63 -18
- data/match/lib/match/migrate.rb +13 -2
- data/match/lib/match/nuke.rb +65 -22
- data/match/lib/match/options.rb +33 -2
- data/match/lib/match/runner.rb +38 -10
- data/match/lib/match/spaceship_ensure.rb +27 -21
- data/match/lib/match/storage/google_cloud_storage.rb +20 -3
- data/match/lib/match/storage/s3_storage.rb +19 -3
- data/scan/lib/scan/detect_values.rb +8 -9
- data/scan/lib/scan/module.rb +4 -0
- data/scan/lib/scan/options.rb +9 -0
- data/scan/lib/scan/runner.rb +2 -1
- data/sigh/lib/assets/resign.sh +1 -1
- data/sigh/lib/sigh/download_all.rb +16 -4
- data/sigh/lib/sigh/options.rb +21 -0
- data/sigh/lib/sigh/runner.rb +83 -41
- data/snapshot/lib/assets/SnapshotHelper.swift +4 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +2 -1
- data/snapshot/lib/snapshot/test_command_generator.rb +1 -1
- data/snapshot/lib/snapshot/test_command_generator_base.rb +3 -1
- data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +1 -1
- data/spaceship/lib/spaceship/client.rb +9 -4
- data/spaceship/lib/spaceship/connect_api.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/api_client.rb +12 -3
- data/spaceship/lib/spaceship/connect_api/client.rb +20 -7
- data/spaceship/lib/spaceship/connect_api/models/app.rb +51 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +3 -1
- data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +2 -1
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +42 -0
- data/spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb +43 -0
- data/spaceship/lib/spaceship/connect_api/models/custom_app_user.rb +41 -0
- data/spaceship/lib/spaceship/connect_api/models/device.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +7 -1
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +59 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +45 -2
- data/spaceship/lib/spaceship/connect_api/spaceship.rb +7 -4
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +13 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +6 -1
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +71 -0
- data/spaceship/lib/spaceship/connect_api/users/users.rb +40 -0
- data/supply/lib/supply.rb +1 -1
- data/supply/lib/supply/uploader.rb +1 -1
- metadata +24 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: a087d077b77ba7df4a5d383d8d607aeda9f3b67e
|
|
4
|
+
data.tar.gz: 31a97905c7bf5685558efd65933780580b69f470
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 155ad8ce03e385a45ebcd3ad1757fa6cc25ae2fda564819f01f61af4a2a871b78ee5a1b5510571516dd8e059482a8a53361aedf1ede90619fe64ce42dcde4cca
|
|
7
|
+
data.tar.gz: cc279dfeae02d6b401761bbdc08e0763a8f10fc7b36c9f1a6c5d369502432e87b4ff9bac93a30997dc5709f282e93962942622c65c05c644494f844f3c875b4f
|
data/README.md
CHANGED
|
@@ -34,11 +34,29 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
|
34
34
|
<!-- This table is regenerated and resorted on each release -->
|
|
35
35
|
<table id='team'>
|
|
36
36
|
<tr>
|
|
37
|
-
<td id='
|
|
38
|
-
<a href='https://github.com/
|
|
39
|
-
<img src='https://github.com/
|
|
37
|
+
<td id='max-ott'>
|
|
38
|
+
<a href='https://github.com/max-ott'>
|
|
39
|
+
<img src='https://github.com/max-ott.png?size=140'>
|
|
40
40
|
</a>
|
|
41
|
-
<h4 align='center'><a href='https://twitter.com/
|
|
41
|
+
<h4 align='center'><a href='https://twitter.com/ott_max'>Max Ott</a></h4>
|
|
42
|
+
</td>
|
|
43
|
+
<td id='danielle-tomlinson'>
|
|
44
|
+
<a href='https://github.com/endocrimes'>
|
|
45
|
+
<img src='https://github.com/endocrimes.png?size=140'>
|
|
46
|
+
</a>
|
|
47
|
+
<h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
|
|
48
|
+
</td>
|
|
49
|
+
<td id='jimmy-dee'>
|
|
50
|
+
<a href='https://github.com/jdee'>
|
|
51
|
+
<img src='https://github.com/jdee.png?size=140'>
|
|
52
|
+
</a>
|
|
53
|
+
<h4 align='center'>Jimmy Dee</h4>
|
|
54
|
+
</td>
|
|
55
|
+
<td id='daniel-jankowski'>
|
|
56
|
+
<a href='https://github.com/mollyIV'>
|
|
57
|
+
<img src='https://github.com/mollyIV.png?size=140'>
|
|
58
|
+
</a>
|
|
59
|
+
<h4 align='center'><a href='https://twitter.com/mollyIV'>Daniel Jankowski</a></h4>
|
|
42
60
|
</td>
|
|
43
61
|
<td id='jorge-revuelta-h'>
|
|
44
62
|
<a href='https://github.com/minuscorp'>
|
|
@@ -46,133 +64,115 @@ If the above doesn't help, please [submit an issue](https://github.com/fastlane/
|
|
|
46
64
|
</a>
|
|
47
65
|
<h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
|
|
48
66
|
</td>
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
<img src='https://github.com/AliSoftware.png?size=140'>
|
|
52
|
-
</a>
|
|
53
|
-
<h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
|
|
54
|
-
</td>
|
|
67
|
+
</tr>
|
|
68
|
+
<tr>
|
|
55
69
|
<td id='fumiya-nakamura'>
|
|
56
70
|
<a href='https://github.com/nafu'>
|
|
57
71
|
<img src='https://github.com/nafu.png?size=140'>
|
|
58
72
|
</a>
|
|
59
73
|
<h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
|
|
60
74
|
</td>
|
|
61
|
-
<td id='
|
|
62
|
-
<a href='https://github.com/
|
|
63
|
-
<img src='https://github.com/
|
|
75
|
+
<td id='manu-wallner'>
|
|
76
|
+
<a href='https://github.com/milch'>
|
|
77
|
+
<img src='https://github.com/milch.png?size=140'>
|
|
64
78
|
</a>
|
|
65
|
-
<h4 align='center'><a href='https://twitter.com/
|
|
79
|
+
<h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
|
|
66
80
|
</td>
|
|
67
|
-
</tr>
|
|
68
|
-
<tr>
|
|
69
81
|
<td id='aaron-brager'>
|
|
70
82
|
<a href='https://github.com/getaaron'>
|
|
71
83
|
<img src='https://github.com/getaaron.png?size=140'>
|
|
72
84
|
</a>
|
|
73
85
|
<h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
|
|
74
86
|
</td>
|
|
75
|
-
<td id='
|
|
76
|
-
<a href='https://github.com/
|
|
77
|
-
<img src='https://github.com/
|
|
87
|
+
<td id='kohki-miki'>
|
|
88
|
+
<a href='https://github.com/giginet'>
|
|
89
|
+
<img src='https://github.com/giginet.png?size=140'>
|
|
78
90
|
</a>
|
|
79
|
-
<h4 align='center'><a href='https://twitter.com/
|
|
91
|
+
<h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
|
|
80
92
|
</td>
|
|
81
|
-
<td id='
|
|
82
|
-
<a href='https://github.com/
|
|
83
|
-
<img src='https://github.com/
|
|
93
|
+
<td id='helmut-januschka'>
|
|
94
|
+
<a href='https://github.com/hjanuschka'>
|
|
95
|
+
<img src='https://github.com/hjanuschka.png?size=140'>
|
|
84
96
|
</a>
|
|
85
|
-
<h4 align='center'><a href='https://twitter.com/
|
|
97
|
+
<h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
|
|
86
98
|
</td>
|
|
87
|
-
|
|
88
|
-
<
|
|
89
|
-
<
|
|
99
|
+
</tr>
|
|
100
|
+
<tr>
|
|
101
|
+
<td id='matthew-ellis'>
|
|
102
|
+
<a href='https://github.com/matthewellis'>
|
|
103
|
+
<img src='https://github.com/matthewellis.png?size=140'>
|
|
90
104
|
</a>
|
|
91
|
-
<h4 align='center'><a href='https://twitter.com/
|
|
105
|
+
<h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
|
|
92
106
|
</td>
|
|
93
|
-
<td id='
|
|
94
|
-
<a href='https://github.com/
|
|
95
|
-
<img src='https://github.com/
|
|
107
|
+
<td id='joshua-liebowitz'>
|
|
108
|
+
<a href='https://github.com/taquitos'>
|
|
109
|
+
<img src='https://github.com/taquitos.png?size=140'>
|
|
96
110
|
</a>
|
|
97
|
-
<h4 align='center'><a href='https://twitter.com/
|
|
111
|
+
<h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
|
|
112
|
+
</td>
|
|
113
|
+
<td id='jan-piotrowski'>
|
|
114
|
+
<a href='https://github.com/janpio'>
|
|
115
|
+
<img src='https://github.com/janpio.png?size=140'>
|
|
116
|
+
</a>
|
|
117
|
+
<h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
|
|
98
118
|
</td>
|
|
99
|
-
</tr>
|
|
100
|
-
<tr>
|
|
101
119
|
<td id='iulian-onofrei'>
|
|
102
120
|
<a href='https://github.com/revolter'>
|
|
103
121
|
<img src='https://github.com/revolter.png?size=140'>
|
|
104
122
|
</a>
|
|
105
123
|
<h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
|
|
106
124
|
</td>
|
|
107
|
-
<td id='jimmy-dee'>
|
|
108
|
-
<a href='https://github.com/jdee'>
|
|
109
|
-
<img src='https://github.com/jdee.png?size=140'>
|
|
110
|
-
</a>
|
|
111
|
-
<h4 align='center'>Jimmy Dee</h4>
|
|
112
|
-
</td>
|
|
113
|
-
<td id='andrew-mcburney'>
|
|
114
|
-
<a href='https://github.com/armcburney'>
|
|
115
|
-
<img src='https://github.com/armcburney.png?size=140'>
|
|
116
|
-
</a>
|
|
117
|
-
<h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
|
|
118
|
-
</td>
|
|
119
125
|
<td id='maksym-grebenets'>
|
|
120
126
|
<a href='https://github.com/mgrebenets'>
|
|
121
127
|
<img src='https://github.com/mgrebenets.png?size=140'>
|
|
122
128
|
</a>
|
|
123
129
|
<h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
|
|
124
130
|
</td>
|
|
131
|
+
</tr>
|
|
132
|
+
<tr>
|
|
125
133
|
<td id='josh-holtz'>
|
|
126
134
|
<a href='https://github.com/joshdholtz'>
|
|
127
135
|
<img src='https://github.com/joshdholtz.png?size=140'>
|
|
128
136
|
</a>
|
|
129
137
|
<h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
|
|
130
138
|
</td>
|
|
131
|
-
|
|
132
|
-
<
|
|
133
|
-
<
|
|
134
|
-
<a href='https://github.com/janpio'>
|
|
135
|
-
<img src='https://github.com/janpio.png?size=140'>
|
|
136
|
-
</a>
|
|
137
|
-
<h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
|
|
138
|
-
</td>
|
|
139
|
-
<td id='danielle-tomlinson'>
|
|
140
|
-
<a href='https://github.com/endocrimes'>
|
|
141
|
-
<img src='https://github.com/endocrimes.png?size=140'>
|
|
139
|
+
<td id='jérôme-lacoste'>
|
|
140
|
+
<a href='https://github.com/lacostej'>
|
|
141
|
+
<img src='https://github.com/lacostej.png?size=140'>
|
|
142
142
|
</a>
|
|
143
|
-
<h4 align='center'><a href='https://twitter.com/
|
|
143
|
+
<h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
|
|
144
144
|
</td>
|
|
145
|
-
<td id='
|
|
146
|
-
<a href='https://github.com/
|
|
147
|
-
<img src='https://github.com/
|
|
145
|
+
<td id='andrew-mcburney'>
|
|
146
|
+
<a href='https://github.com/armcburney'>
|
|
147
|
+
<img src='https://github.com/armcburney.png?size=140'>
|
|
148
148
|
</a>
|
|
149
|
-
<h4 align='center'><a href='https://twitter.com/
|
|
149
|
+
<h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
|
|
150
150
|
</td>
|
|
151
|
-
<td id='
|
|
152
|
-
<a href='https://github.com/
|
|
153
|
-
<img src='https://github.com/
|
|
151
|
+
<td id='felix-krause'>
|
|
152
|
+
<a href='https://github.com/KrauseFx'>
|
|
153
|
+
<img src='https://github.com/KrauseFx.png?size=140'>
|
|
154
154
|
</a>
|
|
155
|
-
<h4 align='center'><a href='https://twitter.com/
|
|
155
|
+
<h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
|
|
156
156
|
</td>
|
|
157
|
-
<td id='
|
|
158
|
-
<a href='https://github.com/
|
|
159
|
-
<img src='https://github.com/
|
|
157
|
+
<td id='olivier-halligon'>
|
|
158
|
+
<a href='https://github.com/AliSoftware'>
|
|
159
|
+
<img src='https://github.com/AliSoftware.png?size=140'>
|
|
160
160
|
</a>
|
|
161
|
-
<h4 align='center'><a href='https://twitter.com/
|
|
161
|
+
<h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
|
|
162
162
|
</td>
|
|
163
163
|
</tr>
|
|
164
164
|
<tr>
|
|
165
|
-
<td id='
|
|
166
|
-
<a href='https://github.com/
|
|
167
|
-
<img src='https://github.com/
|
|
165
|
+
<td id='stefan-natchev'>
|
|
166
|
+
<a href='https://github.com/snatchev'>
|
|
167
|
+
<img src='https://github.com/snatchev.png?size=140'>
|
|
168
168
|
</a>
|
|
169
|
-
<h4 align='center'><a href='https://twitter.com/
|
|
169
|
+
<h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
|
|
170
170
|
</td>
|
|
171
|
-
<td id='
|
|
172
|
-
<a href='https://github.com/
|
|
173
|
-
<img src='https://github.com/
|
|
171
|
+
<td id='luka-mirosevic'>
|
|
172
|
+
<a href='https://github.com/lmirosevic'>
|
|
173
|
+
<img src='https://github.com/lmirosevic.png?size=140'>
|
|
174
174
|
</a>
|
|
175
|
-
<h4 align='center'><a href='https://twitter.com/
|
|
175
|
+
<h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
|
|
176
176
|
</td>
|
|
177
177
|
</table>
|
|
178
178
|
|
data/cert/lib/cert/options.rb
CHANGED
|
@@ -21,7 +21,7 @@ module Cert
|
|
|
21
21
|
optional: true,
|
|
22
22
|
verify_block: proc do |value|
|
|
23
23
|
value = value.to_s
|
|
24
|
-
types = %w(mac_installer_distribution developer_id_installer developer_id_application)
|
|
24
|
+
types = %w(mac_installer_distribution developer_id_installer developer_id_application developer_id_kext)
|
|
25
25
|
UI.user_error!("Unsupported types, must be: #{types}") unless types.include?(value)
|
|
26
26
|
end),
|
|
27
27
|
FastlaneCore::ConfigItem.new(key: :force,
|
|
@@ -35,6 +35,25 @@ module Cert
|
|
|
35
35
|
type: Boolean,
|
|
36
36
|
default_value: FastlaneCore::Helper.mac? && FastlaneCore::Helper.xcode_at_least?('11'),
|
|
37
37
|
default_value_dynamic: true),
|
|
38
|
+
|
|
39
|
+
# App Store Connect API
|
|
40
|
+
FastlaneCore::ConfigItem.new(key: :api_key_path,
|
|
41
|
+
env_name: "DELIVER_API_KEY_PATH",
|
|
42
|
+
description: "Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)",
|
|
43
|
+
optional: true,
|
|
44
|
+
conflicting_options: [:api_key],
|
|
45
|
+
verify_block: proc do |value|
|
|
46
|
+
UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
|
|
47
|
+
end),
|
|
48
|
+
FastlaneCore::ConfigItem.new(key: :api_key,
|
|
49
|
+
env_name: "DELIVER_API_KEY",
|
|
50
|
+
description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)",
|
|
51
|
+
type: Hash,
|
|
52
|
+
optional: true,
|
|
53
|
+
sensitive: true,
|
|
54
|
+
conflicting_options: [:api_key_path]),
|
|
55
|
+
|
|
56
|
+
# Apple ID
|
|
38
57
|
FastlaneCore::ConfigItem.new(key: :username,
|
|
39
58
|
short_option: "-u",
|
|
40
59
|
env_name: "CERT_USERNAME",
|
|
@@ -63,6 +82,8 @@ module Cert
|
|
|
63
82
|
verify_block: proc do |value|
|
|
64
83
|
ENV["FASTLANE_TEAM_NAME"] = value.to_s
|
|
65
84
|
end),
|
|
85
|
+
|
|
86
|
+
# Other Options
|
|
66
87
|
FastlaneCore::ConfigItem.new(key: :filename,
|
|
67
88
|
short_option: "-q",
|
|
68
89
|
env_name: "CERT_FILE_NAME",
|
|
@@ -90,6 +111,12 @@ module Cert
|
|
|
90
111
|
sensitive: true,
|
|
91
112
|
description: "This might be required the first time you access certificates on a new mac. For the login/default keychain this is your account password",
|
|
92
113
|
optional: true),
|
|
114
|
+
FastlaneCore::ConfigItem.new(key: :skip_set_partition_list,
|
|
115
|
+
short_option: "-P",
|
|
116
|
+
env_name: "CERT_SKIP_SET_PARTITION_LIST",
|
|
117
|
+
description: "Skips setting the partition list (which can sometimes take a long time). Setting the partition list is usually needed to prevent Xcode from prompting to allow a cert to be used for signing",
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default_value: false),
|
|
93
120
|
FastlaneCore::ConfigItem.new(key: :platform,
|
|
94
121
|
env_name: "CERT_PLATFORM",
|
|
95
122
|
description: "Set the provisioning profile's platform (ios, macos)",
|
data/cert/lib/cert/runner.rb
CHANGED
|
@@ -20,10 +20,20 @@ module Cert
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def login
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
if api_token
|
|
24
|
+
UI.message("Creating authorization token for App Store Connect API")
|
|
25
|
+
Spaceship::ConnectAPI.token = api_token
|
|
26
|
+
else
|
|
27
|
+
UI.message("Starting login with user '#{Cert.config[:username]}'")
|
|
28
|
+
Spaceship::ConnectAPI.login(Cert.config[:username], nil, use_portal: true, use_tunes: false)
|
|
29
|
+
UI.message("Successfully logged in")
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def api_token
|
|
34
|
+
@api_token ||= Spaceship::ConnectAPI::Token.create(Cert.config[:api_key]) if Cert.config[:api_key]
|
|
35
|
+
@api_token ||= Spaceship::ConnectAPI::Token.from_json_file(Cert.config[:api_key_path]) if Cert.config[:api_key_path]
|
|
36
|
+
return @api_token
|
|
27
37
|
end
|
|
28
38
|
|
|
29
39
|
def run
|
|
@@ -65,11 +75,11 @@ module Cert
|
|
|
65
75
|
|
|
66
76
|
to_revoke.each do |certificate|
|
|
67
77
|
begin
|
|
68
|
-
UI.message("#{certificate.id} #{certificate.
|
|
69
|
-
certificate.
|
|
78
|
+
UI.message("#{certificate.id} #{certificate.display_name} has expired, revoking...")
|
|
79
|
+
certificate.delete!
|
|
70
80
|
revoke_count += 1
|
|
71
81
|
rescue => e
|
|
72
|
-
UI.error("An error occurred while revoking #{certificate.id} #{certificate.
|
|
82
|
+
UI.error("An error occurred while revoking #{certificate.id} #{certificate.display_name}")
|
|
73
83
|
UI.error("#{e.message}\n#{e.backtrace.join("\n")}") if FastlaneCore::Globals.verbose?
|
|
74
84
|
end
|
|
75
85
|
end
|
|
@@ -78,14 +88,12 @@ module Cert
|
|
|
78
88
|
end
|
|
79
89
|
|
|
80
90
|
def expired_certs
|
|
81
|
-
certificates.
|
|
82
|
-
certificate.expires < Time.now.utc
|
|
83
|
-
end
|
|
91
|
+
certificates.reject(&:valid?)
|
|
84
92
|
end
|
|
85
93
|
|
|
86
94
|
def find_existing_cert
|
|
87
95
|
certificates.each do |certificate|
|
|
88
|
-
unless certificate.
|
|
96
|
+
unless certificate.certificate_content
|
|
89
97
|
next
|
|
90
98
|
end
|
|
91
99
|
|
|
@@ -101,23 +109,23 @@ module Cert
|
|
|
101
109
|
ENV["CER_FILE_PATH"] = path
|
|
102
110
|
ENV["CER_KEYCHAIN_PATH"] = keychain
|
|
103
111
|
|
|
104
|
-
UI.success("Found the certificate #{certificate.id} (#{certificate.
|
|
112
|
+
UI.success("Found the certificate #{certificate.id} (#{certificate.display_name}) which is installed on the local machine. Using this one.")
|
|
105
113
|
|
|
106
114
|
return path
|
|
107
115
|
elsif File.exist?(private_key_path)
|
|
108
116
|
password = Cert.config[:keychain_password]
|
|
109
|
-
FastlaneCore::KeychainImporter.import_file(private_key_path, keychain, keychain_password: password)
|
|
110
|
-
FastlaneCore::KeychainImporter.import_file(path, keychain, keychain_password: password)
|
|
117
|
+
FastlaneCore::KeychainImporter.import_file(private_key_path, keychain, keychain_password: password, skip_set_partition_list: Cert.config[:skip_set_partition_list])
|
|
118
|
+
FastlaneCore::KeychainImporter.import_file(path, keychain, keychain_password: password, skip_set_partition_list: Cert.config[:skip_set_partition_list])
|
|
111
119
|
|
|
112
120
|
ENV["CER_CERTIFICATE_ID"] = certificate.id
|
|
113
121
|
ENV["CER_FILE_PATH"] = path
|
|
114
122
|
ENV["CER_KEYCHAIN_PATH"] = keychain
|
|
115
123
|
|
|
116
|
-
UI.success("Found the cached certificate #{certificate.id} (#{certificate.
|
|
124
|
+
UI.success("Found the cached certificate #{certificate.id} (#{certificate.display_name}). Using this one.")
|
|
117
125
|
|
|
118
126
|
return path
|
|
119
127
|
else
|
|
120
|
-
UI.error("Certificate #{certificate.id} (#{certificate.
|
|
128
|
+
UI.error("Certificate #{certificate.id} (#{certificate.display_name}) can't be found on your local computer")
|
|
121
129
|
end
|
|
122
130
|
|
|
123
131
|
File.delete(path) # as apparently this certificate is pretty useless without a private key
|
|
@@ -129,7 +137,10 @@ module Cert
|
|
|
129
137
|
|
|
130
138
|
# All certificates of this type
|
|
131
139
|
def certificates
|
|
132
|
-
|
|
140
|
+
filter = {
|
|
141
|
+
certificateType: certificate_type
|
|
142
|
+
}
|
|
143
|
+
return Spaceship::ConnectAPI::Certificate.all(filter: filter)
|
|
133
144
|
end
|
|
134
145
|
|
|
135
146
|
# The kind of certificate we're interested in
|
|
@@ -137,11 +148,14 @@ module Cert
|
|
|
137
148
|
if Cert.config[:type]
|
|
138
149
|
case Cert.config[:type].to_sym
|
|
139
150
|
when :mac_installer_distribution
|
|
140
|
-
return Spaceship
|
|
151
|
+
return Spaceship::ConnectAPI::Certificate::CertificateType::MAC_INSTALLER_DISTRIBUTION
|
|
141
152
|
when :developer_id_application
|
|
142
|
-
return Spaceship
|
|
153
|
+
return Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_APPLICATION
|
|
154
|
+
when :developer_id_kext
|
|
155
|
+
return Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_KEXT
|
|
143
156
|
when :developer_id_installer
|
|
144
|
-
|
|
157
|
+
raise "Cannot do with ASC API?"
|
|
158
|
+
# return Spaceship.certificate.developer_id_installer
|
|
145
159
|
else
|
|
146
160
|
UI.user_error("Unaccepted value for :type - #{Cert.config[:type]}")
|
|
147
161
|
end
|
|
@@ -149,19 +163,19 @@ module Cert
|
|
|
149
163
|
|
|
150
164
|
# Check if apple certs (Xcode 11 and later) should be used
|
|
151
165
|
if Cert.config[:generate_apple_certs]
|
|
152
|
-
cert_type = Spaceship
|
|
153
|
-
cert_type = Spaceship
|
|
154
|
-
cert_type = Spaceship
|
|
166
|
+
cert_type = Spaceship::ConnectAPI::Certificate::CertificateType::DISTRIBUTION
|
|
167
|
+
cert_type = Spaceship::ConnectAPI::Certificate::CertificateType::IOS_DISTRIBUTION if Spaceship::ConnectAPI.client.in_house? # Enterprise doesn't use Apple Distribution
|
|
168
|
+
cert_type = Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPMENT if Cert.config[:development]
|
|
155
169
|
else
|
|
156
170
|
case Cert.config[:platform].to_s
|
|
157
171
|
when 'ios', 'tvos'
|
|
158
|
-
cert_type = Spaceship
|
|
159
|
-
cert_type = Spaceship
|
|
160
|
-
cert_type = Spaceship
|
|
172
|
+
cert_type = Spaceship::ConnectAPI::Certificate::CertificateType::IOS_DISTRIBUTION
|
|
173
|
+
cert_type = Spaceship::ConnectAPI::Certificate::CertificateType::IOS_DISTRIBUTION if Spaceship::ConnectAPI.client.in_house?
|
|
174
|
+
cert_type = Spaceship::ConnectAPI::Certificate::CertificateType::IOS_DEVELOPMENT if Cert.config[:development]
|
|
161
175
|
|
|
162
176
|
when 'macos'
|
|
163
|
-
cert_type = Spaceship
|
|
164
|
-
cert_type = Spaceship
|
|
177
|
+
cert_type = Spaceship::ConnectAPI::Certificate::CertificateType::MAC_APP_DISTRIBUTION
|
|
178
|
+
cert_type = Spaceship::ConnectAPI::Certificate::CertificateType::MAC_APP_DEVELOPMENT if Cert.config[:development]
|
|
165
179
|
end
|
|
166
180
|
end
|
|
167
181
|
|
|
@@ -170,11 +184,14 @@ module Cert
|
|
|
170
184
|
|
|
171
185
|
def create_certificate
|
|
172
186
|
# Create a new certificate signing request
|
|
173
|
-
csr, pkey = Spaceship.
|
|
187
|
+
csr, pkey = Spaceship::ConnectAPI::Certificate.create_certificate_signing_request
|
|
174
188
|
|
|
175
189
|
# Use the signing request to create a new (development|distribution) certificate
|
|
176
190
|
begin
|
|
177
|
-
certificate =
|
|
191
|
+
certificate = Spaceship::ConnectAPI::Certificate.create(
|
|
192
|
+
certificate_type: certificate_type,
|
|
193
|
+
csr_content: csr.to_pem
|
|
194
|
+
)
|
|
178
195
|
rescue => ex
|
|
179
196
|
type_name = (Cert.config[:development] ? "Development" : "Distribution")
|
|
180
197
|
if ex.to_s.include?("You already have a current")
|
|
@@ -198,8 +215,8 @@ module Cert
|
|
|
198
215
|
# Import all the things into the Keychain
|
|
199
216
|
keychain = File.expand_path(Cert.config[:keychain_path])
|
|
200
217
|
password = Cert.config[:keychain_password]
|
|
201
|
-
FastlaneCore::KeychainImporter.import_file(private_key_path, keychain, keychain_password: password)
|
|
202
|
-
FastlaneCore::KeychainImporter.import_file(cert_path, keychain, keychain_password: password)
|
|
218
|
+
FastlaneCore::KeychainImporter.import_file(private_key_path, keychain, keychain_password: password, skip_set_partition_list: Cert.config[:skip_set_partition_list])
|
|
219
|
+
FastlaneCore::KeychainImporter.import_file(cert_path, keychain, keychain_password: password, skip_set_partition_list: Cert.config[:skip_set_partition_list])
|
|
203
220
|
|
|
204
221
|
# Environment variables for the fastlane action
|
|
205
222
|
ENV["CER_CERTIFICATE_ID"] = certificate.id
|
|
@@ -214,8 +231,8 @@ module Cert
|
|
|
214
231
|
cert_name = filename ? filename : certificate.id
|
|
215
232
|
cert_name = "#{cert_name}.cer" unless File.extname(cert_name) == ".cer"
|
|
216
233
|
path = File.expand_path(File.join(Cert.config[:output_path], cert_name))
|
|
217
|
-
raw_data = certificate.
|
|
218
|
-
File.write(path, raw_data)
|
|
234
|
+
raw_data = Base64.decode64(certificate.certificate_content)
|
|
235
|
+
File.write(path, raw_data.force_encoding("UTF-8"))
|
|
219
236
|
return path
|
|
220
237
|
end
|
|
221
238
|
end
|