fastlane-plugin-wait_xcrun 0.1.0 → 0.1.1

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: 67da3a0ba4896db2e1554b81c2b6bd0522dcaf4b
4
- data.tar.gz: 3fccb1e069353bd63d6db38af1ca90c95ca36413
3
+ metadata.gz: 16f8bc77c0a635e55d37cf62b699a30fff47989e
4
+ data.tar.gz: f8aed4bb27b10a438d855f19b84ae1b6f79a3c40
5
5
  SHA512:
6
- metadata.gz: af56741b19c79e7bb1cf669d0a06b1be7b1bbc32d6d8bd58cf09f37007b1aff56482959702a53de340be130dd3f382133919df73824844ac4fe52c845e44b0c7
7
- data.tar.gz: 6eb5fdb6d89fb3aa5f931c1bfc38eb50199d83f5f3a2e0ac483149d193dbd93396d475285376a38e2d1ded294a559f1f2294ba25ad67f4cbcfbafba209ae7d9f
6
+ metadata.gz: b05e1568a6a8ec2f13bb558e20f2caf0b38ec5e2205211c97e7df5b7e65799301f4a303c0233a63e5351f14714b01a3599028dff4975f3b71654f8fe42d19e51
7
+ data.tar.gz: 6a9d65bd140fde73af7ee449d2507ae37b2f52b27918b701d5614c80996058cb59c547b571e2d5910ffcb9807124fd4692095664c83b84f49b7b3c191e3c46af
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Maksym Grebenets <maksym.grebenets@cba.com.au>
3
+ Copyright (c) 2016 Maksym Grebenets <mgrebenets@gmail.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -14,13 +14,24 @@ fastlane add_plugin wait_xcrun
14
14
 
15
15
  Wait for Xcode toolchain to come back online after switching Xcode versions.
16
16
 
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
17
+ In particular, the plugin is designed to help with issues like this: https://github.com/fastlane/fastlane/issues/5435.
18
+
19
+ This kind of issue often happens on CI servers, for example when previous build was using Xcode 7.3.1 and next build is using Xcode 8. Switching Xcode version can cause Xcode toolchain commands to fail.
18
20
 
19
21
  ## Example
20
22
 
21
- Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
23
+ Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
24
+
25
+ The recommended way is to call `wait_xcrun` in `before_all` hook, but _after_ the `DEVELOPER_DIR` environment variable has been set.
22
26
 
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
27
+ ```ruby
28
+ before_all do
29
+ # Make sure proper Xcode version is selected by CI server
30
+ # or by setting DEVELOPER_DIR environment variable
31
+
32
+ wait_xcrun
33
+ end
34
+ ```
24
35
 
25
36
  ## Run tests for this plugin
26
37
 
@@ -30,11 +41,20 @@ To run both the tests, and code style validation, run
30
41
  rake
31
42
  ```
32
43
 
33
- To automatically fix many of the styling issues, use
44
+ To automatically fix many of the styling issues, use
34
45
  ```
35
46
  rubocop -a
36
47
  ```
37
48
 
49
+ To see the real issue "in action", make sure you have both Xcode 8 and Xcode 7.3.1 installed in `/Applications`.
50
+ Specify the name of Xcode 8 and Xcode 7.3.1 apps without the `.app` extension using `prev_xcode` and `next_xcode` options and run `switch_xcode_test` lane.
51
+
52
+ ```shell
53
+ # In this example Xcode 8 is installed to /Applications/Xcode.app
54
+ # Xcode 7.3.1 is installed to /Applications/Xcode7.3.1.app
55
+ bundle exec fastlane switch_xcode_test prev_xcode:Xcode next_xcode:Xcode7.3.1
56
+ ```
57
+
38
58
  ## Issues and Feedback
39
59
 
40
60
  For any other issues and feedback about this plugin, please submit it to this repository.
@@ -7,12 +7,13 @@ module Fastlane
7
7
  retry_count = 0
8
8
  loop do
9
9
  system("xcrun simctl help 2>/dev/null 1>/dev/null")
10
- break if $?.exitstatus == 0 || retry_count >= 10
10
+ break if $?.success? || retry_count >= 10
11
+ UI.important("Xcode toochain is not ready yet. Retrying ...")
11
12
  sleep(1) # Take a short break
12
13
  retry_count += 1
13
14
  end
14
15
 
15
- $?.exitstatus == 0 ? UI.success("Xcode is back online!") : UI.user_error("Xcode toolchain is offline.")
16
+ $?.success? ? UI.success("Xcode toolchain is back online!") : UI.user_error!("Xcode toolchain is offline.")
16
17
  end
17
18
 
18
19
  def self.description
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module WaitXcrun
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-wait_xcrun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maksym Grebenets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-25 00:00:00.000000000 Z
11
+ date: 2017-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.4.8
129
+ rubygems_version: 2.6.8
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Wait for Xcode toolchain to come back online after switching Xcode versions.