fastlane 0.1.19 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 631af16c08f15cee9b7af0fea8278741b84dde70
4
- data.tar.gz: eed07c5e6b46944c88ae0f12462222153d8d0b52
3
+ metadata.gz: 41deea85e90a3c3de637b3c55f95bdceb4fca899
4
+ data.tar.gz: 2f7d740201ef993271150ba62605b699336607e6
5
5
  SHA512:
6
- metadata.gz: f679dec6d8d5b9cf95d78ea1a770cfb22cbb0fb13f7c0edf20b5fcecb36426ac6b2126f99f72c1b950d92c590b5b1026fb210e0c297221a7643e856de2358faa
7
- data.tar.gz: 6e633288c054b437e9831536e3a62511bfa0a3c0fc2f8a0b1aa4da2b85cd222f84a6ca580afa665e5002dcea4cb3062d68185c4fd82a82cdedc3cbe16b90a331
6
+ metadata.gz: fa6d53fe8188f8f36a77137a328690047fe864c355cda13496adb8db18422077dca3ad66a86f5219811072f752f6a6ee17c6fb50b95be527817b79861a244044
7
+ data.tar.gz: 9e0045c158b5028454c5295e4e026fb1809af3e29af866c5b99f272c423ede03fe838803277792b64294831f776cba0547984f5fc778854ab9e53a2c557f9fb1
data/README.md CHANGED
@@ -121,360 +121,55 @@ fastlane appstore
121
121
 
122
122
  When one command fails, the execution will be aborted.
123
123
 
124
- ### Environment Variables
125
- You can define environment variables in a `.env` or `.env.default` file in the same directory as your `Fastfile`. Environment variables are loading used [dotenv](https://github.com/bkeepers/dotenv)
124
+ ## Available fastlane actions
126
125
 
127
- #### Example using `dotenv`
128
- **Filename:** .env
129
- ```
130
- WORKSPACE=YourApp.xcworkspace
131
- HOCKEYAPP_API_TOKEN=your-hockey-api-token
132
- ```
126
+ ### Project
127
+ - [CocoaPods](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#cocoapods): Setup your CocoaPods project
128
+ - [increment_build_number](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#increment_build_number): Increment the Xcode build number before building the app
133
129
 
134
- #### Environment specific `dotenv` variables
135
- `fastlane` also has a `--env` option that allows loading of environment specific `dotenv` files. `.env` and `.env.default` will be loaded before environment specific `dotenv` files are loaded. The naming convention for environment specific `dotenv` files is `.env.<environment>`
130
+ ### Testing
131
+ - [snapshot](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#snapshot): Automate taking localized screenshots of your iOS app on every device
132
+ - [xctool](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#xctool): Run tests of your app
133
+ - [Testmunk](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#testmunk): Run integration tests on real devices
134
+ - [gcovr](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#gcovr): Generate summarized code coverage reports
136
135
 
137
- **Example:** `fastlane <lane-name> --env development` will load `.env`, `.env.default`, and `.env.development`
136
+ ### Certificates
137
+ - [cert](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#cert): Automatically create and maintain iOS code signing certificates
138
+ - [sigh](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#sigh): Create and maintain your provisioning profiles
139
+ - [resign](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#resign): Re-Sign an existing ipa file
138
140
 
139
- ### Actions
140
- There are some predefined actions you can use. If you have ideas for more, please let me know.
141
+ ### Building
142
+ - [ipa](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#ipa): Build your app for further use of the [uploading](#uploading) section
143
+ - [xcode_select](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#xcode_select): Set a path to a custom Xcode installation
141
144
 
142
- #### [CocoaPods](http://cocoapods.org)
143
- Everyone using [CocoaPods](http://cocoapods.org) will probably want to run a ```pod install``` before running tests and building the app.
144
- ```ruby
145
- cocoapods # this will run pod install
146
- ```
145
+ ### Uploading
146
+ - [deliver](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#deliver): Upload screenshots, metadata and your app to the App Store
147
+ - [HockeyApp](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#hockeyapp): Upload beta builds to Hockey App
148
+ - [Crashlytics Beta](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#crashlytics-beta): Upload beta builds to Crashlytics Beta
149
+ - [DeployGate](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#deploygate): Upload beta builds to DeployGate
147
150
 
151
+ ### Git
152
+ - [ensure_git_status_clean](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#ensure_git_status_clean): Makes sure, the git repository is in a clean state
153
+ - [commit_version_bump](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#commit_version_bump): Automatically commit the version bump of your project
154
+ - [add_git_tag](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#add_git_tag): Automatically add a git tag
155
+ - [push_to_git_remote](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#push_to_git_remote): Push local commits to a git remote
156
+ - [reset_git_repo](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#reset_git_repo): Reset the git repository after the `fastlane` run
148
157
 
149
- #### [xctool](https://github.com/facebook/xctool)
150
- You can run any xctool action. This will require having [xctool](https://github.com/facebook/xctool) installed through [homebrew](http://brew.sh/).
151
- ```ruby
152
- xctool :test
153
- ```
158
+ ### Notifications
154
159
 
155
- It is recommended to have the `xctool` configuration stored in a [`xctool-args`](https://github.com/facebook/xctool#configuration-xctool-args) file.
160
+ Send success and error messages:
156
161
 
157
- #### [snapshot](https://github.com/KrauseFx/snapshot)
158
- ```ruby
159
- snapshot
160
- ```
161
-
162
- To make `snapshot` work without user interaction, follow the [CI-Guide of `snapshot`](https://github.com/KrauseFx/snapshot#run-in-continuous-integration).
163
-
164
- #### [sigh](https://github.com/KrauseFx/sigh)
165
- This will generate and download your App Store provisioning profile. `sigh` will store the generated profile in the `./fastlane` folder.
162
+ - [Slack](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#slack)
163
+ - [HipChat](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#hipchat)
164
+ - [Typetalk](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#typetalk)
165
+ - [Notify](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#notify)
166
166
 
167
- ```ruby
168
- sigh
169
- ```
167
+ ### Misc
168
+ - [frameit](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#frameit): Put your screenshots into the right device frames
169
+ - [produce](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#produce): Create new iOS apps on iTunes Connect and Developer Portal
170
+ - [clean_build_artifacts](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#clean_build_artifacts): Cleans up temporary files created by `sigh` and the other tools
171
+ - [team_id](https://github.com/KrauseFx/fastlane/blob/master/Actions.md#team_id): Select a team ID for the Apple Developer Portal if you are in multiple teams
170
172
 
171
- To use the Ad Hoc profile instead
172
-
173
- ```ruby
174
- sigh :adhoc
175
- ```
176
-
177
- To always re-generate the provisioning profile, use `sigh :force`.
178
-
179
- #### [cert](https://github.com/KrauseFx/cert)
180
-
181
- The `cert` action can be used to make sure to have the latest signing certificate installed. More information on the [`cert` project page](https://github.com/KrauseFx/cert).
182
-
183
- ```ruby
184
- cert
185
- ```
186
-
187
- `fastlane` will automatically pass the signing certificate to use to `sigh`.
188
-
189
- #### [produce](https://github.com/KrauseFx/produce)
190
-
191
- Create new apps on iTunes Connect and Apple Developer Portal. If the app already exists, `produce` will not do anything.
192
-
193
- ```ruby
194
- produce({
195
- produce_username: 'felix@krausefx.com',
196
- produce_app_identifier: 'com.krausefx.app',
197
- produce_app_name: 'MyApp',
198
- produce_language: 'English',
199
- produce_version: '1.0',
200
- produce_sku: 123,
201
- produce_team_name: 'SunApps GmbH' # only necessary when in multiple teams
202
- })
203
- ```
204
-
205
- #### ipa
206
-
207
- Build your app right inside `fastlane` and the path to the resulting ipa is automatically available to all other actions.
208
-
209
- ```ruby
210
- ipa({
211
- workspace: "MyApp.xcworkspace",
212
- configuration: "Debug",
213
- scheme: "MyApp",
214
- })
215
- ```
216
-
217
- The `ipa` action uses [shenzhen](https://github.com/nomad/shenzhen) under the hood.
218
-
219
- The path to the `ipa` is automatically used by `Crashlytics`, `Hockey` and `DeployGate`. To also use it in `deliver` update your `Deliverfile`:
220
-
221
-
222
- ```ruby
223
- ipa ENV["IPA_OUTPUT_PATH"]
224
- beta_ipa ENV["IPA_OUTPUT_PATH"]
225
- ```
226
-
227
- #### [deliver](https://github.com/KrauseFx/deliver)
228
- ```ruby
229
- deliver
230
- ```
231
-
232
- To upload a new build to TestFlight use ```deliver :beta```.
233
-
234
- If you don't want a PDF report for App Store builds, append ```:force``` to the command. This is useful when running ```fastlane``` on your Continuous Integration server: `deliver :force`
235
-
236
- Other options
237
-
238
- - ```deliver :skip_deploy```: To don't submit the app for review (works with both App Store and beta builds)
239
- - ```deliver :force, :skip_deploy```: Combine options using ```,```
240
-
241
- #### [frameit](https://github.com/KrauseFx/frameit)
242
- By default, the device color will be black
243
- ```ruby
244
- frameit
245
- ```
246
-
247
- To use white (sorry, silver) device frames
248
- ```ruby
249
- frameit :silver
250
- ```
251
-
252
- #### [increment_build_number](https://developer.apple.com/library/ios/qa/qa1827/_index.html)
253
- This method will increment the **build number**, not the app version. Usually this is just an auto incremented number. You first have to [set up your Xcode project](https://developer.apple.com/library/ios/qa/qa1827/_index.html), if you haven't done it already.
254
-
255
- ```ruby
256
- increment_build_number # automatically increment by one
257
- increment_build_number '75' # set a specific number
258
- ```
259
-
260
- #### [resign]
261
- This will resign an ipa with another signing identity and provisioning profile.
262
-
263
- If you have used the `ipa` and `sigh` actions, then this action automatically gets the `ipa` and `provisioning_profile` values respectively from those actions and you don't need to manually set them (althout you can always override them).
264
-
265
- ```ruby
266
- resign(
267
- ipa: 'path/to/ipa', # can omit if using the `ipa` action
268
- signing_identity: 'iPhone Distribution: Luka Mirosevic (0123456789)',
269
- provisioning_profile: 'path/to/profile', # can omit if using the `sigh` action
270
- )
271
- ```
272
-
273
- #### [clean_build_artifacts]
274
- This action deletes the files that get created in your repo as a result of running the `ipa` and `sigh` commands. It doesn't delete the `fastlane/report.xml` though, this is probably more suited for the .gitignore.
275
-
276
- Useful if you quickly want to send out a test build by dropping down to the command line and typing something like `fastlane beta`, without leaving your repo in a messy state afterwards.
277
-
278
- ```ruby
279
- clean_build_artifacts
280
- ```
281
-
282
- #### [ensure_git_status_clean]
283
- A sanity check to make sure you are working in a repo that is clean. Especially useful to put at the beginning of your fastfile in the `before_all` block, if some of your other actions will touch your filesystem, do things to your git repo, or just as a general reminder to save your work. Also needed as a prerequisite for some other actions like `reset_git_repo`.
284
-
285
- ```ruby
286
- ensure_git_status_clean
287
- ```
288
-
289
- #### [commit_version_bump]
290
- This action will create a "Version Bump" commit in your repo. Useful in conjunction with `increment_build_number`.
291
-
292
- It checks the repo to make sure that only the relevant files have changed, these are the files that `increment_build_number` (`agvtool`) touches:
293
- - All .plist files
294
- - The `.xcodeproj/project.pbxproj` file
295
-
296
- Then commits those files to the repo.
297
-
298
- Customise the message with the `:message` option, defaults to "Version Bump"
299
-
300
- If you have other uncommitted changes in your repo, this action will fail. If you started off in a clean repo, and used the `ipa` and or `sigh` actions, then you can use the `clean_build_artifacts` action to clean those temporary files up before running this action.
301
-
302
- ```ruby
303
- commit_version_bump
304
-
305
- commit_version_bump(
306
- message: 'New version yo!', # create a commit with a custom message
307
- )
308
- ```
309
-
310
- #### [add_git_tag]
311
- This will automatically tag your build with the following format: `<grouping>/<lane>/<prefix><build_number>`, where:
312
- - `grouping` is just to keep your tags organised under one "folder", defaults to 'builds'
313
- - `lane` is the name of the current fastlane lane
314
- - `prefix` is anything you want to stick in front of the version number, e.g. "v"
315
- - `build_number` is the build number, which defaults to the value emitted by the `increment_build_number` action
316
-
317
- For example for build 1234 in the "appstore" lane it will tag the commit with `builds/appstore/1234`
318
-
319
- ```ruby
320
- add_git_tag # simple tag with default values
321
-
322
- add_git_tag(
323
- grouping: 'fastlane-builds',
324
- prefix: 'v',
325
- build_number: 123
326
- )
327
- ```
328
-
329
- #### [reset_git_repo]
330
- This action will reset your git repo to a clean state, discarding any uncommitted and untracked changes. Useful in case you need to revert the repo back to a clean state, e.g. after the fastlane run.
331
-
332
- It's a pretty drastic action so it comes with a sort of safety latch. It will only proceed with the reset if either of these conditions are met:
333
-
334
- - You have called the `ensure_git_status_clean` action prior to calling this action. This ensures that your repo started off in a clean state, so the only things that will get destroyed by this action are files that are created as a byproduct of the fastlane run.
335
- - You call it with the `:force` option, in which case "you have been warned".
336
-
337
- Also useful for putting in your `error` block, to bring things back to a pristine state (again with the caveat that you have called `ensure_git_status_clean` before)
338
-
339
- ```ruby
340
- reset_git_repo
341
- reset_git_repo :force # if you don't care about warnings and are absolutely sure that you want to discard all changes. This will reset the repo even if you have valuable uncommitted changes, so use with care!
342
- ```
343
-
344
- #### [HockeyApp](http://hockeyapp.net)
345
- ```ruby
346
- hockey({
347
- api_token: '...',
348
- ipa: './app.ipa',
349
- notes: "Changelog"
350
- })
351
- ```
352
-
353
- Symbols will also be uploaded automatically if a `app.dSYM.zip` file is found next to `app.ipa`. In case it is located in a different place you can specify the path explicitly in `:dsym` parameter.
354
-
355
- More information about the available options can be found in the [HockeyApp Docs](http://support.hockeyapp.net/kb/api/api-versions#upload-version).
356
-
357
- #### [Crashlytics Beta](http://try.crashlytics.com/beta/)
358
- ```ruby
359
- crashlytics({
360
- crashlytics_path: './Crashlytics.framework', # path to your 'Crashlytics.framework'
361
- api_token: '...',
362
- build_secret: '...',
363
- ipa_path: './app.ipa'
364
- })
365
- ```
366
- Additionally you can specify `notes_path`, `emails`, `groups` and `notifications`.
367
-
368
- #### AWS S3 Distribution
369
-
370
- Add the `s3` action after the `ipa` step:
371
-
372
- ```ruby
373
- s3
374
- ```
375
-
376
- You can also customize a lot of options:
377
- ```ruby
378
- s3({
379
- # All of these are used to make Shenzhen's `ipa distribute:s3` command
380
- access_key: ENV['S3_ACCESS_KEY'], # Required from user
381
- secret_access_key: ENV['S3_SECRET_ACCESS_KEY'], # Required from user
382
- bucket: ENV['S3_BUCKET'], # Required from user
383
- file: 'AppName.ipa', # This would come from IpaAction
384
- dsym: 'AppName.app.dSYM.zip', # This would come from IpaAction
385
- path: 'v{CFBundleShortVersionString}_b{CFBundleVersion}/' # This is actually the default
386
- })
387
- ```
388
-
389
- It is recommended to **not** store the AWS access keys in the `Fastfile`.
390
-
391
- #### [DeployGate](https://deploygate.com/)
392
-
393
- You can retrieve your username and API token on [your settings page](https://deploygate.com/settings).
394
-
395
- ```ruby
396
- deploygate({
397
- api_token: '...',
398
- user: 'target username or organization name',
399
- ipa: './ipa_file.ipa',
400
- message: "Build #{Actions.lane_context[Actions::SharedValues::BUILD_NUMBER]}",
401
- })
402
- ```
403
-
404
- If you put `deploygate` after `ipa` action, you don't have to specify IPA file path, as it is extracted from the lane context automatically.
405
-
406
- More information about the available options can be found in the [DeployGate Push API document](https://deploygate.com/docs/api).
407
-
408
-
409
- #### [Slack](http://slack.com)
410
- Send a message to **#channel** (by default) or a direct message to **@username** with success (green) or failure (red) status.
411
-
412
- ```ruby
413
- slack({
414
- message: "App successfully released!",
415
- channel: "#channel",
416
- success: true
417
- })
418
- ```
419
-
420
- #### [HipChat](http://www.hipchat.com/)
421
- Send a message to **room** (by default) or a direct message to **@username** with success (green) or failure (red) status.
422
-
423
- ```ruby
424
- ENV["HIPCHAT_API_TOKEN"] = "Your API token"
425
- ENV["HIPCHAT_API_VERSION"] = "1 for API version 1 or 2 for API version 2"
426
-
427
- hipchat({
428
- message: "App successfully released!",
429
- channel: "Room or @username",
430
- success: true
431
- })
432
- ```
433
-
434
- #### [Typetalk](https://typetalk.in/)
435
- Send a message to **topic** with success (:smile:) or failure (:rage:) status.
436
- [Using Bot's Typetalk Token](https://developer.nulab-inc.com/docs/typetalk/auth#tttoken)
437
-
438
- ```ruby
439
- typetalk({
440
- message: "App successfully released!",
441
- note_path: 'ChangeLog.md',
442
- topicId: 1,
443
- success: true,
444
- typetalk_token: 'Your Typetalk Token'
445
- })
446
- ```
447
-
448
- #### [Testmunk](http://testmunk.com)
449
- Run your functional tests on real iOS devices over the cloud (for free on an iPod). With this simple [testcase](https://github.com/testmunk/TMSample/blob/master/testcases/smoke/smoke_features.zip) you can ensure your app launches and there is no crash at launch. Tests can be extended with [Testmunk's library](http://docs.testmunk.com/en/latest/steps.html) or custom steps. More details about this action can be found in [`testmunk.rb`](https://github.com/KrauseFx/fastlane/blob/master/lib/fastlane/actions/testmunk.rb).
450
- ```ruby
451
- ENV['TESTMUNK_EMAIL'] = 'email@email.com'
452
- # Additionally, you have to set TESTMUNK_API, TESTMUNK_APP and TESTMUNK_IPA
453
- testmunk
454
- ```
455
-
456
- #### [gcovr](http://gcovr.com/)
457
- Generate summarized code coverage reports.
458
-
459
- ```ruby
460
- gcovr({
461
- html: true,
462
- html_details: true,
463
- output: "./code-coverage/report.html"
464
- })
465
- ```
466
-
467
- #### [xcode_select](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html)
468
- Use this command if you are supporting multiple versions of Xcode
469
-
470
- ```ruby
471
- xcode_select "/Applications/Xcode6.1.app"
472
- ```
473
-
474
- #### Custom Shell Scripts
475
- ```ruby
476
- sh "./your_bash_script.sh"
477
- ```
478
173
 
479
174
  ### *before_all* block
480
175
  This block will get executed *before* running the requested lane. It supports the same actions as lanes.
@@ -512,6 +207,7 @@ end
512
207
  ```
513
208
 
514
209
  # Extensions
210
+
515
211
  Why only use the default actions? Create your own to extend the functionality of `fastlane`.
516
212
 
517
213
  The build step you create will behave exactly like the built in actions.
@@ -524,59 +220,7 @@ If you think your extension can be used by other developers as well, let me know
524
220
 
525
221
  # Jenkins Integration
526
222
 
527
- `fastlane` automatically generates a JUnit report for you. This allows Continuous Integration systems, like `Jenkins`, access the results of your deployment.
528
-
529
- ## Installation
530
- The recommended way to install [Jenkins](http://jenkins-ci.org/) is through [homebrew](http://brew.sh/):
531
-
532
- ```brew update && brew install jenkins```
533
-
534
- From now on start ```Jenkins``` by running:
535
- ```
536
- jenkins
537
- ```
538
-
539
- To store the password in the Keychain of your remote machine, I recommend running `sigh` or `deliver` using ssh or remote desktop at least once.
540
-
541
- ## Deploy Strategy
542
-
543
- You should **not** deploy a new App Store update after every commit, since you still have to wait 1-2 weeks for the review. Instead I recommend using Git Tags, or custom triggers to deploy a new update.
544
-
545
- You can set up your own ```Release``` job, which is only triggered manually.
546
-
547
- ## Plugins
548
-
549
- I recommend the following plugins:
550
-
551
- - **[HTML Publisher Plugin](https://wiki.jenkins-ci.org/display/JENKINS/HTML+Publisher+Plugin):** Can be used to show the generated screenshots right inside Jenkins.
552
- - **[AnsiColor Plugin](https://wiki.jenkins-ci.org/display/JENKINS/AnsiColor+Plugin):** Used to show the coloured output of the fastlane tools. Dont' forget to enable `Color ANSI Console Output` in the `Build Environment` or your project.
553
- - **[Rebuild Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Rebuild+Plugin):** This plugin will save you a lot of time.
554
-
555
- ## Build Step
556
- Use the following as your build step:
557
- ```
558
- fastlane appstore
559
- ```
560
- Replace `appstore` with the lane you want to use.
561
-
562
- ## Test Results and Screenshtos
563
-
564
- To show the **deployment result** right in `Jenkins`
565
-
566
- - *Add post-build action*
567
- - *Publish JUnit test result report*
568
- - *Test report XMLs*: `fastlane/report.xml`
569
-
570
- To show the **generated screenhots** right in `Jenkins`
571
-
572
- - *Add post-build action*
573
- - *Publish HTML reports*
574
- - *HTML directory to archive*: `fastlane/screenshots`
575
- - *Index page*: `screenshots.html`
576
-
577
- Save and run. The result should look like this:
578
-
579
- ![JenkinsIntegration](assets/JenkinsIntegration.png)
223
+ The `Jenkins` setup was moved to [Jenkins.md](https://github.com/KrauseFx/fastlane/blob/master/Jenkins.md).
580
224
 
581
225
  # Tips
582
226
 
@@ -594,25 +238,6 @@ Save and run. The result should look like this:
594
238
  ##### [Like this tool? Be the first to know about updates and new fastlane tools](https://tinyletter.com/krausefx)
595
239
 
596
240
  ## Advanced
597
- #### Lane Context
598
- The different actions can *communicate* with each other using a shared hash.
599
- Access them in your scrips using:
600
- ```ruby
601
- Actions.lane_context[Actions::SharedValues::LANE_NAME] # the name of the current lane
602
- ```
603
- Available variables (put that inside the square brackets of the above snippet)
604
- ```ruby
605
- Actions::SharedValues::BUILD_NUMBER # generated by `increment_build_number`
606
- Actions::SharedValues::SNAPSHOT_SCREENSHOTS_PATH # generated by `snapshot`
607
- Actions::SharedValues::PRODUCE_APPLE_ID # the Apple ID of the newly created app
608
- Actions::SharedValues::IPA_OUTPUT_PATH # generated by `ipa`
609
- Actions::SharedValues::SIGH_PROFILE_PATH # generated by `sigh`
610
- Actions::SharedValues::SIGH_UDID # the UDID of the generated provisioning profile
611
- Actions::SharedValues::HOCKEY_DOWNLOAD_LINK #generated by `hockey`
612
- Actions::SharedValues::DEPLOYGATE_URL # generated by `deploygate`
613
- Actions::SharedValues::DEPLOYGATE_APP_REVISION # integer, generated by `deploygate`
614
- Actions::SharedValues::DEPLOYGATE_APP_INFO # Hash, generated by `deploygate`
615
- ````
616
241
 
617
242
  #### Complex Fastfile Example
618
243
  ```ruby
@@ -680,46 +305,7 @@ error do |lane, exception|
680
305
  end
681
306
  ```
682
307
 
683
- #### Set Team ID/Name for all tools
684
-
685
- To set a team ID for `sigh`, `PEM` and the other tools, add this code to your `before_all` block:
686
-
687
- ```ruby
688
- team_id "Q2CBPK58CA"
689
-
690
- # or
691
-
692
- team_name "Felix Krause"
693
- ```
694
-
695
- Alternatively you can add this information to your `fastlane/Appfile`.
696
-
697
- #### Snapshot
698
- To skip cleaning the project on every build:
699
- ```ruby
700
- snapshot :noclean
701
- ```
702
-
703
- To show the output of `UIAutomation`:
704
- ```ruby
705
- snapshot :verbose
706
- ```
707
-
708
- #### Run multiple ```lanes```
709
- You can run multiple ```lanes``` (in the given order) using
710
- ```
711
- fastlane test inhouse appstore
712
- ````
713
- Keep in mind the ```before_all``` and ```after_all``` block will be executed for each of the ```lanes```.
714
-
715
- #### Hide the `fastlane` folder
716
- Just rename the folder to `.fastlane` in case you don't want it to be visible in the Finder.
717
-
718
- #### Load own actions from external folder
719
- Add this to the top of your `Fastfile` (*.* is the `fastlane` folder)
720
- ```ruby
721
- actions_path '../custom_actions_folder/'
722
- ```
308
+ ##### More advanced settings and tips can be found in [Advanced.md](https://github.com/KrauseFx/fastlane/blob/master/Advanced.md)
723
309
 
724
310
  # Credentials
725
311
  A detailed description about your credentials is available on a [separate repo](https://github.com/KrauseFx/CredentialsManager).
@@ -16,7 +16,7 @@ module Fastlane
16
16
  # This should be executed in the fastlane folder
17
17
 
18
18
  values = params.first
19
- if params.kind_of?Array
19
+ unless values.kind_of?Hash
20
20
  # Old syntax
21
21
  values = {}
22
22
  params.each do |val|
@@ -0,0 +1,12 @@
1
+ module Fastlane
2
+ module Actions
3
+ class NotifyAction
4
+ def self.run(params)
5
+ require 'terminal-notifier'
6
+
7
+ text = params.join(' ')
8
+ TerminalNotifier.notify(text, title: 'fastlane')
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,33 @@
1
+ module Fastlane
2
+ module Actions
3
+ # Adds a git tag to the current commit
4
+ class PushToGitRemoteAction
5
+ def self.run(params)
6
+ options = params.first
7
+
8
+ remote = (options && options[:remote]) || 'origin'
9
+ force = (options && options[:force]) || false
10
+ local_branch = (options && options[:branch]) || 'master'
11
+ remote_branch = (options && options[:branch]) || local_branch
12
+
13
+ # construct our command as an array of components
14
+ command = [
15
+ 'git',
16
+ 'push',
17
+ remote,
18
+ "#{local_branch}:#{remote_branch}",
19
+ '--tags'
20
+ ]
21
+
22
+ # optionally add the force component
23
+ command << '--force' if force
24
+
25
+ # execute our command
26
+ puts Actions.sh('pwd')
27
+ Actions.sh(command.join(' '))
28
+
29
+ Helper.log.info 'Sucesfully pushed to remote.'
30
+ end
31
+ end
32
+ end
33
+ end
@@ -13,7 +13,8 @@ module Fastlane
13
13
  require 'credentials_manager/appfile_config'
14
14
 
15
15
  values = params.first
16
- if params.kind_of?Array
16
+
17
+ unless values.kind_of?Hash
17
18
  # Old syntax
18
19
  values = {}
19
20
  params.each do |val|
@@ -0,0 +1,161 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ XCODEBUILD_ARCHIVE = :XCODEBUILD_ARCHIVE
5
+ end
6
+
7
+ # xcodebuild man page:
8
+ # https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html
9
+
10
+ class XcodebuildAction
11
+ ARGS_MAP = {
12
+ # actions
13
+ analyze: "analyze",
14
+ archive: "archive",
15
+ build: "build",
16
+ clean: "clean",
17
+ install: "install",
18
+ installsrc: "installsrc",
19
+ test: "test",
20
+
21
+ # parameters
22
+ alltargets: "-alltargets",
23
+ arch: "-arch",
24
+ archive_path: "-archivePath",
25
+ configuration: "-configuration",
26
+ derivedDataPath: "-derivedDataPath",
27
+ destination: "-destination",
28
+ export_archive: "-exportArchive",
29
+ export_format: "-exportFormat",
30
+ export_installer_identity: "-exportInstallerIdentity",
31
+ export_path: "-exportPath",
32
+ export_profile: "-exportProvisioningProfile",
33
+ export_signing_identity: "-exportSigningIdentity",
34
+ export_with_original_signing_identity: "-exportWithOriginalSigningIdentity",
35
+ project: "-project",
36
+ result_bundle_path: "-resultBundlePath",
37
+ scheme: "-scheme",
38
+ sdk: "-sdk",
39
+ skip_unavailable_actions: "-skipUnavailableActions",
40
+ target: "-target",
41
+ workspace: "-workspace",
42
+ xcconfig: "-xcconfig"
43
+ }
44
+
45
+ def self.run(params)
46
+ unless Helper.test?
47
+ raise "xcodebuild not installed".red if `which xcodebuild`.length == 0
48
+ end
49
+
50
+ # The args we will build with
51
+ cli_args = Array[]
52
+
53
+ # Supported ENV vars
54
+ build_path = ENV["BUILD_PATH"] || ""
55
+ scheme = ENV["SCHEME"]
56
+ workspace = ENV["WORKSPACE"]
57
+ project = ENV["PROJECT"]
58
+
59
+ # Append slash to build path, if needed
60
+ unless build_path.end_with? "/"
61
+ build_path += "/"
62
+ end
63
+
64
+ if params = params.first
65
+ # Operation bools
66
+ archiving = params.key? :archive
67
+ exporting = params.key? :export_archive
68
+ testing = params.key? :test
69
+
70
+ if exporting
71
+ # If not passed, retrieve path from previous xcodebuild call
72
+ params[:archive_path] ||= Actions.lane_context[SharedValues::XCODEBUILD_ARCHIVE]
73
+
74
+ # Default to ipa as export format
75
+ params[:export_format] ||= "ipa"
76
+
77
+ # If not passed, construct export path from env vars
78
+ params[:export_path] ||= "#{build_path}#{scheme}"
79
+
80
+ # Store IPA path for later deploy steps (i.e. Crashlytics)
81
+ Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = params[:export_path] + "." + params[:export_format].downcase
82
+ else
83
+ # If not passed, check for archive scheme & workspace/project env vars
84
+ params[:scheme] ||= scheme
85
+ params[:workspace] ||= workspace
86
+ params[:project] ||= project
87
+ end
88
+
89
+ if archiving
90
+ # If not passed, construct archive path from env vars
91
+ params[:archive_path] ||= "#{build_path}#{params[:scheme]}.xcarchive"
92
+
93
+ # Cache path for later xcodebuild calls
94
+ Actions.lane_context[SharedValues::XCODEBUILD_ARCHIVE] = params[:archive_path]
95
+ end
96
+
97
+ # Maps parameter hash to CLI args
98
+ if hash_args = hash_to_cli_args(params)
99
+ cli_args += hash_args
100
+ end
101
+ end
102
+
103
+ # Joins args into space delimited string
104
+ cli_args = cli_args.join(" ")
105
+
106
+ output_format = testing && !archiving ? "--test" : "--simple"
107
+
108
+ Actions.sh "xcodebuild #{cli_args} | xcpretty #{output_format} --color"
109
+ end
110
+
111
+ def self.hash_to_cli_args(hash)
112
+ # Remove nil value params
113
+ hash = hash.delete_if { |_, v| v.nil? }
114
+
115
+ # Maps nice developer param names to CLI arguments
116
+ hash.map do |k, v|
117
+ v ||= ""
118
+ if arg = ARGS_MAP[k]
119
+ value = (v != true && v.to_s.length > 0 ? "\"#{v}\"" : "")
120
+ "#{arg} #{value}".strip
121
+ elsif k == :keychain && v.to_s.length > 0
122
+ # If keychain is specified, append as OTHER_CODE_SIGN_FLAGS
123
+ "OTHER_CODE_SIGN_FLAGS=\"--keychain #{v}\""
124
+ end
125
+ end.compact.sort
126
+ end
127
+ end
128
+
129
+ class XcarchiveAction
130
+ def self.run(params)
131
+ params_hash = params.first || {}
132
+ params_hash[:archive] = true
133
+ XcodebuildAction.run([params_hash])
134
+ end
135
+ end
136
+
137
+ class XcbuildAction
138
+ def self.run(params)
139
+ params_hash = params.first || {}
140
+ params_hash[:build] = true
141
+ XcodebuildAction.run([params_hash])
142
+ end
143
+ end
144
+
145
+ class XccleanAction
146
+ def self.run(params)
147
+ params_hash = params.first || {}
148
+ params_hash[:clean] = true
149
+ XcodebuildAction.run([params_hash])
150
+ end
151
+ end
152
+
153
+ class XctestAction
154
+ def self.run(params)
155
+ params_hash = params.first || {}
156
+ params_hash[:test] = true
157
+ XcodebuildAction.run([params_hash])
158
+ end
159
+ end
160
+ end
161
+ end
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '0.1.19'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.22'
83
+ - !ruby/object:Gem::Dependency
84
+ name: xcpretty
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '0.1'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '0.1'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: fastlane_core
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +114,14 @@ dependencies:
100
114
  requirements:
101
115
  - - '>='
102
116
  - !ruby/object:Gem::Version
103
- version: 0.5.0
117
+ version: 0.7.13
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - '>='
109
123
  - !ruby/object:Gem::Version
110
- version: 0.5.0
124
+ version: 0.7.13
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: snapshot
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -128,56 +142,56 @@ dependencies:
128
142
  requirements:
129
143
  - - '>='
130
144
  - !ruby/object:Gem::Version
131
- version: 0.2.0
145
+ version: 0.2.3
132
146
  type: :runtime
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
150
  - - '>='
137
151
  - !ruby/object:Gem::Version
138
- version: 0.2.0
152
+ version: 0.2.3
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: pem
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
157
  - - '>='
144
158
  - !ruby/object:Gem::Version
145
- version: 0.3.0
159
+ version: 0.3.8
146
160
  type: :runtime
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
164
  - - '>='
151
165
  - !ruby/object:Gem::Version
152
- version: 0.3.0
166
+ version: 0.3.8
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: sigh
155
169
  requirement: !ruby/object:Gem::Requirement
156
170
  requirements:
157
171
  - - '>='
158
172
  - !ruby/object:Gem::Version
159
- version: 0.4.3
173
+ version: 0.4.5
160
174
  type: :runtime
161
175
  prerelease: false
162
176
  version_requirements: !ruby/object:Gem::Requirement
163
177
  requirements:
164
178
  - - '>='
165
179
  - !ruby/object:Gem::Version
166
- version: 0.4.3
180
+ version: 0.4.5
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: produce
169
183
  requirement: !ruby/object:Gem::Requirement
170
184
  requirements:
171
185
  - - '>='
172
186
  - !ruby/object:Gem::Version
173
- version: 0.1.0
187
+ version: 0.1.6
174
188
  type: :runtime
175
189
  prerelease: false
176
190
  version_requirements: !ruby/object:Gem::Requirement
177
191
  requirements:
178
192
  - - '>='
179
193
  - !ruby/object:Gem::Version
180
- version: 0.1.0
194
+ version: 0.1.6
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: cert
183
197
  requirement: !ruby/object:Gem::Requirement
@@ -192,6 +206,20 @@ dependencies:
192
206
  - - '>='
193
207
  - !ruby/object:Gem::Version
194
208
  version: 0.1.3
209
+ - !ruby/object:Gem::Dependency
210
+ name: terminal-notifier
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ~>
214
+ - !ruby/object:Gem::Version
215
+ version: 1.6.2
216
+ type: :runtime
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ~>
221
+ - !ruby/object:Gem::Version
222
+ version: 1.6.2
195
223
  - !ruby/object:Gem::Dependency
196
224
  name: bundler
197
225
  requirement: !ruby/object:Gem::Requirement
@@ -338,7 +366,9 @@ files:
338
366
  - lib/fastlane/actions/increment_build_number.rb
339
367
  - lib/fastlane/actions/install_cocapods.rb
340
368
  - lib/fastlane/actions/ipa.rb
369
+ - lib/fastlane/actions/notify.rb
341
370
  - lib/fastlane/actions/produce.rb
371
+ - lib/fastlane/actions/push_to_git_remote.rb
342
372
  - lib/fastlane/actions/reset_git_repo.rb
343
373
  - lib/fastlane/actions/resign.rb
344
374
  - lib/fastlane/actions/s3.rb
@@ -352,6 +382,7 @@ files:
352
382
  - lib/fastlane/actions/typetalk.rb
353
383
  - lib/fastlane/actions/update_project_code_signing.rb
354
384
  - lib/fastlane/actions/xcode_select.rb
385
+ - lib/fastlane/actions/xcodebuild.rb
355
386
  - lib/fastlane/actions/xctool.rb
356
387
  - lib/fastlane/core_ext/string.rb
357
388
  - lib/fastlane/dependency_checker.rb