fastlane 2.61.0.beta.20171006010004 → 2.61.0.beta.20171007010004

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -161
  3. data/cert/README.md +7 -166
  4. data/deliver/README.md +7 -287
  5. data/deliver/lib/deliver/runner.rb +1 -1
  6. data/fastlane/README.md +7 -209
  7. data/fastlane/lib/fastlane/actions/cocoapods.rb +27 -8
  8. data/fastlane/lib/fastlane/actions/docs/assets/FrameitGit.gif +0 -0
  9. data/fastlane/lib/fastlane/actions/docs/assets/MacExample.png +0 -0
  10. data/fastlane/lib/fastlane/actions/docs/assets/PEMRecording.gif +0 -0
  11. data/fastlane/lib/fastlane/actions/docs/assets/PilotTextTransparent.png +0 -0
  12. data/fastlane/lib/fastlane/actions/docs/assets/PilotTextTransparentSmall.png +0 -0
  13. data/fastlane/lib/fastlane/actions/docs/assets/PilotTextWhite.png +0 -0
  14. data/fastlane/lib/fastlane/actions/docs/assets/PilotTransparent.png +0 -0
  15. data/fastlane/lib/fastlane/actions/docs/assets/QuickLookScreenshot.png +0 -0
  16. data/fastlane/lib/fastlane/actions/docs/assets/ScreenshotsBig.png +0 -0
  17. data/fastlane/lib/fastlane/actions/docs/assets/ScreenshotsOverview.png +0 -0
  18. data/fastlane/lib/fastlane/actions/docs/assets/SignErrors.png +0 -0
  19. data/fastlane/lib/fastlane/actions/docs/assets/UDIDPrint.png +0 -0
  20. data/fastlane/lib/fastlane/actions/docs/assets/frameit.png +0 -0
  21. data/fastlane/lib/fastlane/actions/docs/assets/github_repo.png +0 -0
  22. data/fastlane/lib/fastlane/actions/docs/assets/htmlPage.png +0 -0
  23. data/fastlane/lib/fastlane/actions/docs/assets/htmlPagePreview.jpg +0 -0
  24. data/fastlane/lib/fastlane/actions/docs/assets/htmlPagePreviewFade.jpg +0 -0
  25. data/fastlane/lib/fastlane/actions/docs/assets/match.png +0 -0
  26. data/fastlane/lib/fastlane/actions/docs/assets/match_appstore_small.gif +0 -0
  27. data/fastlane/lib/fastlane/actions/docs/assets/match_init.gif +0 -0
  28. data/fastlane/lib/fastlane/actions/docs/assets/match_nuke.gif +0 -0
  29. data/fastlane/lib/fastlane/actions/docs/assets/pem.png +0 -0
  30. data/fastlane/lib/fastlane/actions/docs/assets/pilot.ai +5377 -16
  31. data/fastlane/lib/fastlane/actions/docs/assets/precheck.gif +0 -0
  32. data/fastlane/lib/fastlane/actions/docs/assets/precheck.png +0 -0
  33. data/fastlane/lib/fastlane/actions/docs/assets/produce.png +0 -0
  34. data/fastlane/lib/fastlane/actions/docs/assets/running-screengrab.gif +0 -0
  35. data/fastlane/lib/fastlane/actions/docs/assets/scan.png +0 -0
  36. data/fastlane/lib/fastlane/actions/docs/assets/scanHTML.png +0 -0
  37. data/fastlane/lib/fastlane/actions/docs/assets/scanHTMLFailing.png +0 -0
  38. data/fastlane/lib/fastlane/actions/docs/assets/scanScreenshot.png +0 -0
  39. data/fastlane/lib/fastlane/actions/docs/assets/screengrab.png +0 -0
  40. data/fastlane/lib/fastlane/actions/docs/assets/sigh.png +0 -0
  41. data/fastlane/lib/fastlane/actions/docs/assets/sighRecording.gif +0 -0
  42. data/fastlane/lib/fastlane/actions/docs/assets/slack.png +0 -0
  43. data/fastlane/lib/fastlane/actions/docs/assets/snapshot.gif +0 -0
  44. data/fastlane/lib/fastlane/actions/docs/assets/snapshot.png +0 -0
  45. data/fastlane/lib/fastlane/actions/docs/assets/supply.png +0 -0
  46. data/fastlane/lib/fastlane/actions/docs/assets/testSummary.png +0 -0
  47. data/fastlane/lib/fastlane/actions/docs/cert.md +2 -4
  48. data/fastlane/lib/fastlane/actions/docs/deliver.md +1 -3
  49. data/fastlane/lib/fastlane/actions/docs/frameit.md +215 -0
  50. data/fastlane/lib/fastlane/actions/docs/gym.md +17 -17
  51. data/fastlane/lib/fastlane/actions/docs/match.md +352 -0
  52. data/fastlane/lib/fastlane/actions/docs/pem.md +120 -0
  53. data/fastlane/lib/fastlane/actions/docs/pilot.md +218 -0
  54. data/fastlane/lib/fastlane/actions/docs/precheck.md +97 -0
  55. data/fastlane/lib/fastlane/actions/docs/produce.md +227 -0
  56. data/fastlane/lib/fastlane/actions/docs/scan.md +145 -0
  57. data/fastlane/lib/fastlane/actions/docs/screengrab.md +145 -0
  58. data/fastlane/lib/fastlane/actions/docs/sigh.md +187 -0
  59. data/fastlane/lib/fastlane/actions/docs/snapshot.md +333 -0
  60. data/fastlane/lib/fastlane/actions/docs/supply.md +144 -0
  61. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +5 -0
  62. data/fastlane/lib/fastlane/setup/setup_ios.rb +2 -0
  63. data/fastlane/lib/fastlane/version.rb +1 -1
  64. data/frameit/README.md +7 -290
  65. data/gym/README.md +7 -300
  66. data/match/README.md +7 -420
  67. data/match/lib/match/generator.rb +1 -0
  68. data/match/lib/match/git_helper.rb +31 -12
  69. data/match/lib/match/runner.rb +11 -6
  70. data/pem/README.md +7 -188
  71. data/pilot/README.md +7 -285
  72. data/pilot/lib/pilot/build_manager.rb +13 -10
  73. data/precheck/README.md +7 -171
  74. data/produce/README.md +7 -294
  75. data/scan/README.md +7 -219
  76. data/screengrab/README.md +7 -192
  77. data/sigh/README.md +7 -262
  78. data/snapshot/README.md +7 -408
  79. data/snapshot/lib/snapshot/reset_simulators.rb +4 -2
  80. data/spaceship/lib/spaceship/test_flight/build.rb +1 -1
  81. data/supply/README.md +7 -219
  82. metadata +52 -2
data/match/README.md CHANGED
@@ -1,430 +1,17 @@
1
1
  <h3 align="center">
2
- <a href="https://github.com/fastlane/fastlane/tree/master/fastlane">
3
- <img src="../fastlane/assets/fastlane.png" width="150" />
2
+ <a href="https://docs.fastlane.tools/actions/match">
3
+ <img src="https://raw.githubusercontent.com/fastlane/fastlane/master/fastlane/assets/fastlane.png" width="100" />
4
4
  <br />
5
5
  fastlane
6
6
  </a>
7
7
  </h3>
8
- <p align="center">
9
- <a href="https://github.com/fastlane/fastlane/tree/master/deliver">deliver</a> &bull;
10
- <a href="https://github.com/fastlane/fastlane/tree/master/snapshot">snapshot</a> &bull;
11
- <a href="https://github.com/fastlane/fastlane/tree/master/frameit">frameit</a> &bull;
12
- <a href="https://github.com/fastlane/fastlane/tree/master/pem">pem</a> &bull;
13
- <a href="https://github.com/fastlane/fastlane/tree/master/sigh">sigh</a> &bull;
14
- <a href="https://github.com/fastlane/fastlane/tree/master/produce">produce</a> &bull;
15
- <a href="https://github.com/fastlane/fastlane/tree/master/cert">cert</a> &bull;
16
- <a href="https://github.com/fastlane/fastlane/tree/master/spaceship">spaceship</a> &bull;
17
- <a href="https://github.com/fastlane/fastlane/tree/master/pilot">pilot</a> &bull;
18
- <a href="https://github.com/fastlane/boarding">boarding</a> &bull;
19
- <a href="https://github.com/fastlane/fastlane/tree/master/gym">gym</a> &bull;
20
- <a href="https://github.com/fastlane/fastlane/tree/master/scan">scan</a> &bull;
21
- <b>match</b> &bull;
22
- <a href="https://github.com/fastlane/fastlane/tree/master/precheck">precheck</a>
23
- </p>
24
-
25
- -------
26
-
27
- <p align="center">
28
- <img src="assets/match.png" height="110">
29
- </p>
30
-
31
- match
32
- ============
33
-
34
- [![Twitter: @FastlaneTools](https://img.shields.io/badge/contact-@FastlaneTools-blue.svg?style=flat)](https://twitter.com/FastlaneTools)
35
- [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/fastlane/blob/master/match/LICENSE)
36
-
37
- ###### Easily sync your certificates and profiles across your team using git
38
-
39
- A new approach to iOS code signing: Share one code signing identity across your development team to simplify your codesigning setup and prevent code signing issues.
40
-
41
- `match` is the implementation of the https://codesigning.guide concept. `match` creates all required certificates & provisioning profiles and stores them in a separate git repository. Every team member with access to the repo can use those credentials for code signing. `match` also automatically repairs broken and expired credentials. It's the easiest way to share signing credentials across teams
42
-
43
- [More information on how to get started with codesigning](/fastlane/docs/Codesigning)
44
-
45
- -------
46
-
47
- <p align="center">
48
- <a href="#why-match">Why?</a> &bull;
49
- <a href="#installation">Installation</a> &bull;
50
- <a href="#usage">Usage</a> &bull;
51
- <a href="#is-this-secure">Is this secure?</a> &bull;
52
- <a href="#need-help">Need help?</a>
53
- </p>
54
-
55
- -------
56
-
57
- <h5 align="center"><code>match</code> is part of <a href="https://fastlane.tools">fastlane</a>: The easiest way to automate beta deployments and releases for your iOS and Android apps.</h5>
58
-
59
- ## Why match?
60
-
61
- Before starting to use `match`, make sure to read the [codesigning.guide](https://codesigning.guide)
62
-
63
- > When deploying an app to the App Store, beta testing service or even installing it on a device, most development teams have separate code signing identities for every member. This results in dozens of profiles including a lot of duplicates.
64
-
65
- > You have to manually renew and download the latest set of provisioning profiles every time you add a new device or a certificate expires. Additionally this requires spending a lot of time when setting up a new machine that will build your app.
66
-
67
- **A new approach**
68
-
69
- > Share one code signing identity across your development team to simplify your setup and prevent code signing issues. What if there was a central place where your code signing identity and profiles are kept, so anyone in the team can access them during the build process?
70
-
71
- ### Why not let Xcode handle all this?
72
-
73
- - You have full control over what happens
74
- - You have access to all the certificates and profiles, which are all securely stored in git
75
- - You share one code signing identity across the team to have fewer certificates and profiles
76
- - Xcode sometimes revokes certificates which breaks your setup causing failed builds
77
- - More predictable builds by settings profiles in an explicit way instead of using the `Automatic` setting
78
- - It just works™
79
-
80
- ### What does `match` do for you?
81
-
82
- | | match |
83
- |----------|---------|
84
- :arrows_counterclockwise: | Automatically sync your iOS keys and profiles across all your team members using git
85
- :package: | Handle all the heavy lifting of creating and storing your certificates and profiles
86
- :computer: | Setup codesigning on a new machine in under a minute
87
- :dart: | Designed to work with apps with multiple targets and bundle identifiers
88
- :lock: | You have full control over your files and Git repo, no third party service involved
89
- :sparkles: | Provisioning profile will always match the correct certificate
90
- :boom: | Easily reset your existing profiles and certificates if your current account has expired or invalid profiles
91
- :recycle: | Automatically renew your provisioning profiles to include all your devices using the `--force` option
92
- :busts_in_silhouette: | Support for multiple Apple accounts and multiple teams
93
- :sparkles: | Tightly integrated with [fastlane](https://fastlane.tools) to work seamlessly with [gym](https://github.com/fastlane/fastlane/tree/master/gym) and other build tools
94
-
95
- For more information about the concept, visit [codesigning.guide](https://codesigning.guide).
96
-
97
- ## Installation
98
-
99
- ```
100
- sudo gem install fastlane
101
- ```
102
-
103
- Make sure you have the latest version of the Xcode command line tools installed:
104
-
105
- xcode-select --install
106
-
107
- ## Usage
108
-
109
- ### Setup
110
-
111
- 1. Create a **new, private Git repo** (e.g. on [GitHub](https://github.com/new) or [BitBucket](https://bitbucket.org/repo/create)) and name it something like `certificates`. **Important:** Make sure the repository is set to *private*.
112
-
113
- 2. Optional: Create a **new, shared Apple Developer Portal account**, something like `office@company.com` that will be shared across your team from now on (for more information visit [codesigning.guide](https://codesigning.guide))
114
-
115
- 3. Run the following in your project folder to start using `match`:
116
-
117
- ```
118
- fastlane match init
119
- ```
120
-
121
- <img src="assets/match_init.gif" width="550" />
122
-
123
- You'll be asked to enter the URL to your Git repo. This can be either a `https://` or a `git` URL. (If your machine is currently using SSH to authenticate with Github, you'll want to use a `git` URL, otherwise you may see an authentication error when you attempt to use match.) `fastlane match init` won't read or modify your certificates or profiles.
124
-
125
- This will create a `Matchfile` in your current directory (or in your `./fastlane/` folder).
126
-
127
- Example content (for more advanced setups check out the [fastlane section](#fastlane)):
128
-
129
- ```ruby
130
- git_url "https://github.com/fastlane/fastlane/tree/master/certificates"
131
-
132
- app_identifier "tools.fastlane.app"
133
- username "user@fastlane.tools"
134
- ```
135
-
136
- #### Important: Use one git branch per team
137
-
138
- `match` also supports storing certificates of multiple teams in one repo, by using separate git branches. If you work in multiple teams, make sure to set the `git_branch` parameter to a unique value per team. From there, `match` will automatically create and use the specified branch for you.
139
-
140
- ```ruby
141
- match(git_branch: "team1", username: "user@team1.com")
142
- match(git_branch: "team2", username: "user@team2.com")
143
- ```
144
-
145
- ### Run
146
-
147
- > Before running `match` for the first time, you should consider clearing your existing profiles and certificates using the [match nuke command](#nuke).
148
-
149
- After running `fastlane match init` you can run the following to generate new certificates and profiles:
150
-
151
- ```
152
- fastlane match appstore
153
- ```
154
-
155
- ```
156
- fastlane match development
157
- ```
158
-
159
- <img src="assets/match_appstore_small.gif" width="550" />
160
-
161
- This will create a new certificate and provisioning profile (if required) and store them in your Git repo. If you previously ran `match` it will automatically install the existing profiles from the Git repo.
162
-
163
- The provisioning profiles are installed in `~/Library/MobileDevice/Provisioning Profiles` while the certificates and private keys are installed in your Keychain.
164
-
165
- To get a more detailed output of what `match` is doing use
166
-
167
- ```
168
- fastlane match --verbose
169
- ```
170
-
171
- For a list of all available options run
172
-
173
- ```
174
- fastlane match --help
175
- ```
176
-
177
- #### Handle multiple targets
178
-
179
- If you have several targets with different bundle identifiers, supply them as a comma-separated list to :
180
-
181
- ```
182
- fastlane match appstore -a tools.fastlane.app,tools.fastlane.app.watchkitapp
183
- ```
184
-
185
- You can make this even easier using [fastlane](https://github.com/fastlane/fastlane/tree/master/fastlane) by creating a `certificates` lane like this:
186
-
187
- ```
188
- lane :certificates do
189
- match(app_identifier: ["com.krausefx.app1", "com.krausefx.app2", "com.krausefx.app3"], readonly: true)
190
- end
191
- ```
192
-
193
- Then all your team has to do is `fastlane certificates` and keys, certs and profiles for all targets will be synced.
194
-
195
- #### Passphrase
196
-
197
- When running `match` for the first time on a new machine, it will ask you for the passphrase for the Git repository. This is an additional layer of security: each of the files will be encrypted using `openssl`. Make sure to remember the password, as you'll need it when you run match on a different machine.
198
-
199
- To set the passphrase to decrypt your profiles using an environment variable, use `MATCH_PASSWORD`.
200
-
201
- #### New machine
202
-
203
- To set up the certificates and provisioning profiles on a new machine, you just run the same command using:
204
-
205
- ```
206
- fastlane match development
207
- ```
208
-
209
- You can also run `match` in a `readonly` mode to be sure it won't create any new certificates or profiles.
210
-
211
- ```
212
- fastlane match development --readonly
213
- ```
214
-
215
- #### Access Control
216
-
217
- A benefit of using `match` is that it enables you to give the developers of your team access to the code signing certificates without having to give everyone access to the Developer Portal:
218
-
219
- 1. Run `match` to store the certificates in a Git repo
220
- 2. Grant access to the Git repo to your developers and give them the passphrase
221
- 3. The developers can now run `match` which will install the latest code signing profiles so they can build and sign the application without having to have access to the developer portal
222
- 4. Every time you run `match` to update the profiles (e.g. add a new device), all your developers will automatically get the latest profiles when running `match`
223
8
 
224
- If you decide to run `match` without access to the developer portal, make sure to use the `--readonly` option so that the commands don't ask you for the password to the developer portal.
225
-
226
- The advantage of this approach is that no one in your team will revoke a certificate by mistake. Additionally it is recommended to install the [FixCode Xcode Plugin](https://github.com/neonichu/FixCode) to disable the `Fix Issue` button.
227
-
228
- #### Git Repo
229
-
230
- After running `match` for the first time, your Git repo will contain 2 directories:
231
-
232
- - The `certs` folder contains all certificates with their private keys
233
- - The `profiles` folder contains all provisioning profiles
234
-
235
- Additionally, `match` creates a nice repo `README.md` for you, making it easy to onboard new team members:
9
+ ------
236
10
 
237
11
  <p align="center">
238
- <img src="assets/github_repo.png" width="700" />
12
+ <a href="https://docs.fastlane.tools/actions/match">
13
+ <img src="https://raw.githubusercontent.com/fastlane/fastlane/master/match/assets/match.png" height="110">
14
+ </a>
239
15
  </p>
240
16
 
241
- #### fastlane
242
-
243
- Add `match` to your `Fastfile` to automatically fetch the latest code signing certificates with [fastlane](https://fastlane.tools).
244
-
245
- ```ruby
246
- match(type: "appstore")
247
-
248
- match(git_url: "https://github.com/fastlane/fastlane/tree/master/certificates",
249
- type: "development")
250
-
251
- match(git_url: "https://github.com/fastlane/fastlane/tree/master/certificates",
252
- type: "adhoc",
253
- app_identifier: "tools.fastlane.app")
254
-
255
- match(git_url: "https://github.com/fastlane/fastlane/tree/master/certificates",
256
- type: "enterprise",
257
- app_identifier: "tools.fastlane.app")
258
-
259
- # `match` should be called before building the app with `gym`
260
- gym
261
- ...
262
- ```
263
-
264
- ##### Registering new devices
265
-
266
- By using `match`, you'll save a lot of time every time you add new device to your Ad Hoc or Development profiles. Use `match` in combination with the [`register_devices`](https://docs.fastlane.tools/actions#register_devices) action.
267
-
268
- ```ruby
269
- lane :beta do
270
- register_devices(devices_file: "./devices.txt")
271
- match(type: "adhoc", force_for_new_devices: true)
272
- end
273
- ```
274
-
275
- By using the `force_for_new_devices` parameter, `match` will check if the device count has changed since the last time you ran `match`, and automatically re-generate the provisioning profile if necessary. You can also use `force: true` to re-generate the provisioning profile on each run.
276
-
277
- _**Important:** The `force_for_new_devices` parameter is ignored for App Store provisioning profiles since they don't contain any device information._
278
-
279
- If you're not using `fastlane`, you can also use the `force_for_new_devices` option from the command line:
280
-
281
- ```
282
- fastlane match adhoc --force_for_new_devices
283
- ```
284
-
285
- ##### Multiple Targets
286
-
287
- If your app has multiple targets (e.g. Today Widget or WatchOS Extension)
288
-
289
- ```ruby
290
- match(app_identifier: ["tools.fastlane.app", "tools.fastlane.app.today_widget"], type: "appstore")
291
- ```
292
-
293
- `match` can even use the same one Git repository for all bundle identifiers.
294
-
295
- ### Setup Xcode project
296
-
297
- [Docs on how to set up your Xcode project](https://docs.fastlane.tools/codesigning/XcodeProject/)
298
-
299
- #### To build from the command line using [fastlane](https://fastlane.tools)
300
-
301
- `match` automatically pre-fills environment variables with the UUIDs of the correct provisioning profiles, ready to be used in your Xcode project.
302
-
303
- More information about how to setup your Xcode project can be found [here](https://docs.fastlane.tools/codesigning/XcodeProject/)
304
-
305
- #### To build from Xcode manually
306
-
307
- This is useful when installing your application on your device using the Development profile.
308
-
309
- You can statically select the right provisioning profile in your Xcode project (the name will be `match Development tools.fastlane.app`).
310
-
311
- [Docs on how to set up your Xcode project](/fastlane/docs/Codesigning/XcodeProject.md)
312
-
313
- ### Continuous Integration
314
-
315
- #### Repo access
316
- There is one tricky part of setting up a CI system to work with `match`, which is enabling the CI to access the repo. Usually you'd just add your CI's public ssh key as a deploy key to your `match` repo, but since your CI will already likely be using its public ssh key to access the codebase repo, [you won't be able to do that](https://help.github.com/articles/error-key-already-in-use/).
317
-
318
- Some repo hosts might allow you to use the same deploy key for different repos, but GitHub will not. If your host does, you don't need to worry about this, just add your CI's public ssh key as a deploy key for your `match` repo and scroll down to "_Encryption password_".
319
-
320
- There are a few ways around this:
321
-
322
- 1. Create a new account on your repo host with read-only access to your `match` repo. Bitrise have a good description of this [here](http://devcenter.bitrise.io/faq/adding-projects-with-submodules/).
323
- 2. Some CIs allow you to upload your signing credentials manually, but obviously this means that you'll have to re-upload the profiles/keys/certs each time they change.
324
-
325
- Neither solution is pretty. It's one of those _trade-off_ things. Do you care more about **not** having an extra account sitting around, or do you care more about having the :sparkles: of auto-syncing of credentials.
326
-
327
- #### Encryption password
328
- Once you've decided which approach to take, all that's left to do is to set your encryption password as secret environment variable named `MATCH_PASSWORD`. `match` will pick this up when it's run.
329
-
330
- ### Nuke
331
-
332
- If you never really cared about code signing and have a messy Apple Developer account with a lot of invalid, expired or Xcode managed profiles/certificates, you can use the `match nuke` command to revoke your certificates and provisioning profiles. Don't worry, apps that are already available in the App Store / TestFlight will still work. Builds distributed via Ad Hoc or Enterprise will be disabled after nuking your account, so you'll have to re-upload a new build. After clearing your account you'll start from a clean state, and you can run `match` to generate your certificates and profiles again.
333
-
334
- To revoke all certificates and provisioning profiles for a specific environment:
335
-
336
- ```sh
337
- fastlane match nuke development
338
- fastlane match nuke distribution
339
- ```
340
-
341
- <img src="assets/match_nuke.gif" width="550" />
342
-
343
- You'll have to confirm a list of profiles / certificates that will be deleted.
344
-
345
- ### Change Password
346
-
347
- To change the password of your repo and therefore decrypting and encrypting all files run
348
-
349
- ```
350
- fastlane match change_password
351
- ```
352
-
353
- You'll be asked for the new password on all your machines on the next run.
354
-
355
- ### Manual Decrypt
356
-
357
- If you want to manually decrypt a file you can.
358
-
359
- ```
360
- openssl aes-256-cbc -k "<password>" -in "<fileYouWantToDecryptPath>" -out "<decryptedFilePath>" -a -d
361
- ```
362
-
363
-
364
- ## Is this secure?
365
-
366
- Both your keys and provisioning profiles are encrypted using OpenSSL using a passphrase.
367
-
368
- Storing your private keys in a Git repo may sound off-putting at first. We did an in-depth analysis of potential security issues and came to the following conclusions:
369
-
370
- #### What could happen if someone stole a private key?
371
-
372
- If attackers would have your certificate and provisioning profile, they could codesign an application with the same bundle identifier.
373
-
374
- What's the worst that could happen for each of the profile types?
375
-
376
- ##### App Store Profiles
377
-
378
- An App Store profile can't be used for anything as long as it's not re-signed by Apple. The only way to get an app resigned is to submit an app for review which could take anywhere from 24 hours to a few days (checkout [appreviewtimes.com](http://appreviewtimes.com) for up-to-date expectations). Attackers could only submit an app for review, if they also got access to your iTunes Connect credentials (which are not stored in git, but in your local keychain). Additionally you get an email notification every time a build gets uploaded to cancel the submission even before your app gets into the review stage.
379
-
380
- ##### Development and Ad Hoc Profiles
381
-
382
- In general those profiles are harmless as they can only be used to install a signed application on a small subset of devices. To add new devices, the attacker would also need your Apple Developer Portal credentials (which are not stored in git, but in your local keychain).
383
-
384
- ##### Enterprise Profiles
385
-
386
- Attackers could use an In-House profile to distribute signed application to a potentially unlimited number of devices. All this would run under your company name and it could eventually lead to Apple revoking your In-House account. However it is very easy to revoke a certificate to remotely break the app on all devices.
387
-
388
- Because of the potentially dangerous nature of In-House profiles please use _match_ with enterprise profiles with caution, ensure your git repository is private and use a secure password.
389
-
390
- ##### To sum up
391
-
392
- - You have full control over the access list of your Git repo, no third party service involved
393
- - Even if your certificates are leaked, they can't be used to cause any harm without your iTunes Connect login credentials
394
- - Use In-House enterprise profile with _match_ with caution
395
- - If you use GitHub or Bitbucket we encourage enabling 2 factor authentication for all accounts that have access to the certificates repo
396
- - The complete source code of `match` is fully open source on [GitHub](https://github.com/fastlane/fastlane/tree/master/match)
397
-
398
- ## [`fastlane`](https://fastlane.tools) Toolchain
399
-
400
- - [`fastlane`](https://fastlane.tools): The easiest way to automate beta deployments and releases for your iOS and Android apps
401
- - [`deliver`](https://github.com/fastlane/fastlane/tree/master/deliver): Upload screenshots, metadata and your app to the App Store
402
- - [`snapshot`](https://github.com/fastlane/fastlane/tree/master/snapshot): Automate taking localized screenshots of your iOS app on every device
403
- - [`frameit`](https://github.com/fastlane/fastlane/tree/master/frameit): Quickly put your screenshots into the right device frames
404
- - [`pem`](https://github.com/fastlane/fastlane/tree/master/pem): Automatically generate and renew your push notification profiles
405
- - [`produce`](https://github.com/fastlane/fastlane/tree/master/produce): Create new iOS apps on iTunes Connect and Dev Portal using the command line
406
- - [`cert`](https://github.com/fastlane/fastlane/tree/master/cert): Automatically create and maintain iOS code signing certificates
407
- - [`spaceship`](https://github.com/fastlane/fastlane/tree/master/spaceship): Ruby library to access the Apple Dev Center and iTunes Connect
408
- - [`pilot`](https://github.com/fastlane/fastlane/tree/master/pilot): The best way to manage your TestFlight testers and builds from your terminal
409
- - [`boarding`](https://github.com/fastlane/boarding): The easiest way to invite your TestFlight beta testers
410
- - [`gym`](https://github.com/fastlane/fastlane/tree/master/gym): Building your iOS apps has never been easier
411
- - [`scan`](https://github.com/fastlane/fastlane/tree/master/scan): The easiest way to run tests of your iOS and Mac app
412
- - [`precheck`](https://github.com/fastlane/fastlane/tree/master/precheck): Check your app using a community driven set of App Store review rules to avoid being rejected
413
-
414
- # Need help?
415
-
416
- Before submitting a new GitHub issue, please make sure to
417
-
418
- - Check out [docs.fastlane.tools](https://docs.fastlane.tools)
419
- - Check out the README pages on [this repo](https://github.com/fastlane/fastlane)
420
- - Search for [existing GitHub issues](https://github.com/fastlane/fastlane/issues)
421
-
422
- If the above doesn't help, please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup, in particular the output of the `fastlane env` command.
423
-
424
- # Code of Conduct
425
- Help us keep `match` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/fastlane/blob/master/CODE_OF_CONDUCT.md).
426
-
427
- # License
428
- This project is licensed under the terms of the MIT license. See the LICENSE file.
429
-
430
- > This project and all fastlane tools are in no way affiliated with Apple Inc. This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs. All fastlane tools run on your own computer or server, so your credentials or other sensitive information will never leave your own computer. You are responsible for how you use fastlane tools.
17
+ <h3 align="center">The <i>match</i> docs were moved to <a href='https://docs.fastlane.tools/actions/match'>docs.fastlane.tools</a></h3>
@@ -30,6 +30,7 @@ module Match
30
30
  Dir[File.join(params[:workspace], "**", "*.certSigningRequest")].each { |path| File.delete(path) }
31
31
 
32
32
  # we need to return the path
33
+ # Inside this directory, there is the `.p12` file and the `.cer` file with the same name, but different extension
33
34
  return cert_path
34
35
  end
35
36
 
@@ -1,5 +1,7 @@
1
1
  module Match
2
2
  class GitHelper
3
+ MATCH_VERSION_FILE_NAME = "match_version.txt"
4
+
3
5
  def self.clone(git_url,
4
6
  shallow_clone,
5
7
  manual_password: nil,
@@ -62,7 +64,6 @@ module Match
62
64
  return self.clone(git_url, shallow_clone)
63
65
  end
64
66
 
65
- copy_readme(@dir) unless skip_docs
66
67
  Encrypt.new.decrypt_repo(path: @dir, git_url: git_url, manual_password: manual_password)
67
68
 
68
69
  return @dir
@@ -80,21 +81,45 @@ module Match
80
81
  end
81
82
 
82
83
  def self.match_version(workspace)
83
- path = File.join(workspace, "match_version.txt")
84
+ path = File.join(workspace, MATCH_VERSION_FILE_NAME)
84
85
  if File.exist?(path)
85
86
  Gem::Version.new(File.read(path))
86
87
  end
87
88
  end
88
89
 
89
- def self.commit_changes(path, message, git_url, branch = "master")
90
+ def self.commit_changes(path, message, git_url, branch = "master", files_to_commmit = nil)
91
+ files_to_commmit ||= []
90
92
  Dir.chdir(path) do
91
93
  return if `git status`.include?("nothing to commit")
92
94
 
93
95
  Encrypt.new.encrypt_repo(path: path, git_url: git_url)
94
- File.write("match_version.txt", Fastlane::VERSION) # unencrypted
95
-
96
96
  commands = []
97
- commands << "git add -A"
97
+
98
+ if files_to_commmit.count > 0 # e.g. for nuke this is treated differently
99
+ if !File.exist?(MATCH_VERSION_FILE_NAME) || File.read(MATCH_VERSION_FILE_NAME) != Fastlane::VERSION.to_s
100
+ files_to_commmit << MATCH_VERSION_FILE_NAME
101
+ File.write(MATCH_VERSION_FILE_NAME, Fastlane::VERSION) # stored unencrypted
102
+ end
103
+
104
+ template = File.read("#{Match::ROOT}/lib/assets/READMETemplate.md")
105
+ readme_path = "README.md"
106
+ if !File.exist?(readme_path) || File.read(readme_path) != template
107
+ files_to_commmit << readme_path
108
+ File.write(readme_path, template)
109
+ end
110
+
111
+ # `git add` each file we want to commit
112
+ # - Fixes https://github.com/fastlane/fastlane/issues/8917
113
+ # - Fixes https://github.com/fastlane/fastlane/issues/8793
114
+ # - Replaces, closes and fixes https://github.com/fastlane/fastlane/pull/8919
115
+ commands += files_to_commmit.map do |current_file|
116
+ "git add #{current_file.shellescape}"
117
+ end
118
+ else
119
+ # No specific list given, e.g. this happens on `fastlane match nuke`
120
+ # We just want to run `git add -A` to commit everything
121
+ commands << "git add -A"
122
+ end
98
123
  commands << "git commit -m #{message.shellescape}"
99
124
  commands << "GIT_TERMINAL_PROMPT=0 git push origin #{branch.shellescape}"
100
125
 
@@ -158,12 +183,6 @@ module Match
158
183
  return !result.empty?
159
184
  end
160
185
 
161
- # Copies the README.md into the git repo
162
- def self.copy_readme(directory)
163
- template = File.read("#{Match::ROOT}/lib/assets/READMETemplate.md")
164
- File.write(File.join(directory, "README.md"), template)
165
- end
166
-
167
186
  def self.add_user_config(user_name, user_email)
168
187
  # Add git config if needed
169
188
  commands = []