fastlane 2.19.0.beta.20170222010016 → 2.19.0.beta.20170223010028

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: 1f9036c3e8f09d2613f7233cef08fe68106ff01b
4
- data.tar.gz: 154bdc8e424c41b2faea3b863bdd9728075b4617
3
+ metadata.gz: 1f1d47db5ce97473c74875f0b1b867485e1af075
4
+ data.tar.gz: bf2719c072219e1a61e04af0ed5af2eac1b55a6a
5
5
  SHA512:
6
- metadata.gz: 08a93c416a1d39e971bae8396f34b1382e846780e5add9447a60822ec6c8d103d8a2067c80a8815a2b2114b917998b834568cabce3feea6b0520e8218a96ae7d
7
- data.tar.gz: 7463168cc5e25e2cc2a76c4cdd0673fe1b0c5393fe3cd7d78f06a98f4968cca8d31d6e5dfc2b1a891479e80983d60c5d8c60df027b01a153154a4e31ce9257cf
6
+ metadata.gz: 9065e7b1e2aba27deb95a7c635157d43623ea60ff170974862d36e3fd377ad204012d2720b76b8511fc526755babb59ec5439738c6ba611aef8b7fc1ce8c5737
7
+ data.tar.gz: 6ccdb9e5cd7e919f605f875e6fdaa1bdda57bf9627b79080c199fa1c5829d004ec87d95fc2e4e23c78b0fcff62995ebeb425168af4aea496972cef85380a6c2d
@@ -39,7 +39,7 @@ module Deliver
39
39
  end
40
40
  else
41
41
  UI.message("Selecting the latest build...")
42
- build = FastlaneCore::BuildWatcher.wait_for_build(app, options[:app_platform], sleep_time)
42
+ build = wait_for_build(app)
43
43
  end
44
44
  UI.message("Selecting build #{build.train_version} (#{build.build_version})...")
45
45
 
@@ -48,5 +48,40 @@ module Deliver
48
48
 
49
49
  UI.success("Successfully selected build")
50
50
  end
51
+
52
+ def wait_for_build(app)
53
+ UI.user_error!("Could not find app with app identifier") unless app
54
+
55
+ start = Time.now
56
+
57
+ loop do
58
+ build = find_build(app.latest_version.candidate_builds)
59
+ return build if build.processing == false
60
+
61
+ UI.message("Waiting iTunes Connect processing for build #{build.train_version} (#{build.build_version})... this might take a while...")
62
+ if (Time.now - start) > (60 * 5)
63
+ UI.message("")
64
+ UI.message("You can tweet: \"iTunes Connect #iosprocessingtime #{((Time.now - start) / 60).round} minutes\"")
65
+ end
66
+ sleep 30
67
+ end
68
+ nil
69
+ end
70
+
71
+ def find_build(candidate_builds)
72
+ build = nil
73
+ candidate_builds.each do |b|
74
+ if !build or b.upload_date > build.upload_date
75
+ build = b
76
+ end
77
+ end
78
+
79
+ unless build
80
+ UI.error(candidate_builds)
81
+ UI.crash!("Could not find build")
82
+ end
83
+
84
+ return build
85
+ end
51
86
  end
52
87
  end
@@ -6,8 +6,6 @@ module Fastlane
6
6
 
7
7
  require 'frameit'
8
8
 
9
- FastlaneCore::UpdateChecker.start_looking_for_update('frameit') unless Helper.is_test?
10
-
11
9
  UI.message("Framing screenshots at path #{config[:path]}")
12
10
 
13
11
  Dir.chdir(config[:path]) do
@@ -10,7 +10,6 @@ module Fastlane
10
10
 
11
11
  return if Helper.test?
12
12
 
13
- FastlaneCore::UpdateChecker.start_looking_for_update('produce')
14
13
  Produce.config = params # we alread have the finished config
15
14
 
16
15
  Dir.chdir(FastlaneCore::FastlaneFolder.path || Dir.pwd) do
@@ -5,8 +5,6 @@ module Fastlane
5
5
  require 'supply'
6
6
  require 'supply/options'
7
7
 
8
- FastlaneCore::UpdateChecker.start_looking_for_update('supply') unless Helper.is_test?
9
-
10
8
  all_apk_paths = Actions.lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS] || []
11
9
  if all_apk_paths.length > 1
12
10
  params[:apk_paths] ||= all_apk_paths
@@ -22,6 +22,8 @@ module Fastlane
22
22
  print_slow_fastlane_warning
23
23
  end
24
24
 
25
+ FastlaneCore::UpdateChecker.start_looking_for_update('fastlane')
26
+
25
27
  ARGV.unshift("spaceship") if ARGV.first == "spaceauth"
26
28
  tool_name = ARGV.first ? ARGV.first.downcase : nil
27
29
 
@@ -62,6 +64,8 @@ module Fastlane
62
64
  require "fastlane/commands_generator"
63
65
  Fastlane::CommandsGenerator.start
64
66
  end
67
+ ensure
68
+ FastlaneCore::UpdateChecker.show_update_status('fastlane', Fastlane::VERSION)
65
69
  end
66
70
 
67
71
  # Since fastlane also supports the rocket and biceps emoji as executable
@@ -30,7 +30,7 @@ module Fastlane
30
30
  $stdout = out_channel
31
31
  $stderr = out_channel
32
32
  end
33
- FastlaneCore::UpdateChecker.start_looking_for_update('fastlane')
33
+
34
34
  Fastlane.load_actions
35
35
  FastlaneCore::Swag.stop_loader
36
36
  # do not use "include" as it may be some where in the commandline where "env" is required, therefore explicit index->0
@@ -41,7 +41,6 @@ module Fastlane
41
41
  end
42
42
  self.new.run
43
43
  ensure
44
- FastlaneCore::UpdateChecker.show_update_status('fastlane', Fastlane::VERSION)
45
44
  Fastlane::PluginUpdateManager.show_update_status
46
45
  if FastlaneCore::Globals.capture_output?
47
46
  FastlaneCore::Globals.captured_output = Helper.strip_ansi_colors($stdout.string)
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '2.19.0.beta.20170222010016'.freeze
2
+ VERSION = '2.19.0.beta.20170223010028'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  end
@@ -5,7 +5,6 @@ require 'fastlane_core/globals'
5
5
  # Ruby monkey-patches - should be before almost all else
6
6
  require 'fastlane_core/core_ext/string'
7
7
 
8
- require 'fastlane_core/build_watcher'
9
8
  require 'fastlane_core/env'
10
9
  require 'fastlane_core/feature/feature'
11
10
  require 'fastlane_core/features'
data/pem/README.md CHANGED
@@ -120,6 +120,22 @@ Instead, you may verify the file is valid using OpenSSL:
120
120
 
121
121
  openssl pkcs12 -info -in my.p12
122
122
 
123
+ If you need the `p12` in your keychain, perhaps to test push with an app like [Knuff](https://github.com/KnuffApp/Knuff) or [Pusher](https://github.com/noodlewerk/NWPusher), you can use `openssl` to export the `p12` to `pem` and back to `p12`:
124
+
125
+ % openssl pkcs12 -in my.p12 -out my.pem
126
+ Enter Import Password:
127
+ <hit enter: the p12 has no password>
128
+ MAC verified OK
129
+ Enter PEM pass phrase:
130
+ <enter a temporary password to encrypt the pem file>
131
+
132
+ % openssl pkcs12 -export -in my.pem -out my-with-passphrase.p12
133
+ Enter pass phrase for temp.pem:
134
+ <enter the temporary password to decrypt the pem file>
135
+
136
+ Enter Export Password:
137
+ <enter a password for encrypting the new p12 file>
138
+
123
139
  ##### [Like this tool? Be the first to know about updates and new fastlane tools](https://tinyletter.com/krausefx)
124
140
 
125
141
  ## Environment Variables
@@ -31,7 +31,8 @@ module Pilot
31
31
  end
32
32
 
33
33
  UI.message("If you want to skip waiting for the processing to be finished, use the `skip_waiting_for_build_processing` option")
34
- uploaded_build = FastlaneCore::BuildWatcher.wait_for_build(app, platform, config[:wait_processing_interval].to_i)
34
+ uploaded_build = wait_for_processing_build(options, platform) # this might take a while
35
+
35
36
  distribute(options, uploaded_build)
36
37
  end
37
38
 
@@ -123,6 +124,71 @@ module Pilot
123
124
  options[:changelog].to_s.length > 0 or options[:beta_app_description].to_s.length > 0 or options[:beta_app_feedback_email].to_s.length > 0
124
125
  end
125
126
 
127
+ # This method will takes care of checking for the processing builds every few seconds
128
+ # @return [Build] The build that we just uploaded
129
+ def wait_for_processing_build(options, platform)
130
+ # the upload date of the new buid
131
+ # we use it to identify the build
132
+ start = Time.now
133
+ wait_processing_interval = config[:wait_processing_interval].to_i
134
+ latest_build = nil
135
+ UI.message("Waiting for iTunes Connect to process the new build")
136
+ must_update_build_info = config[:update_build_info_on_upload]
137
+ loop do
138
+ sleep(wait_processing_interval)
139
+
140
+ # before we look for processing builds, we need to ensure that there
141
+ # is a build train for this application; new applications don't
142
+ # build trains right away, and if we don't do this check, we will
143
+ # get break out of this loop and then generate an error later when we
144
+ # have a nil build
145
+ if app.build_trains(platform: platform).count == 0
146
+ UI.message("New application; waiting for build train to appear on iTunes Connect")
147
+ else
148
+ builds = app.all_processing_builds(platform: platform)
149
+ break if builds.count == 0
150
+ latest_build = builds.last
151
+
152
+ if latest_build.valid and must_update_build_info
153
+ # Set the changelog and/or description if necessary
154
+ if should_update_build_information(options)
155
+ latest_build.update_build_information!(whats_new: options[:changelog], description: options[:beta_app_description], feedback_email: options[:beta_app_feedback_email])
156
+ UI.success "Successfully set the changelog and/or description for build"
157
+ end
158
+ must_update_build_info = false
159
+ end
160
+
161
+ UI.message("Waiting for iTunes Connect to finish processing the new build (#{latest_build.train_version} - #{latest_build.build_version})")
162
+ end
163
+ end
164
+
165
+ UI.user_error!("Error receiving the newly uploaded binary, please check iTunes Connect") if latest_build.nil?
166
+ full_build = nil
167
+
168
+ while full_build.nil? || full_build.processing
169
+ # The build's processing state should go from true to false, and be done. But sometimes it goes true -> false ->
170
+ # true -> false, where the second true is transient. This causes a spurious failure. Find build by build_version
171
+ # and ensure it's not processing before proceeding - it had to have already been false before, to get out of the
172
+ # previous loop.
173
+ full_build = app.build_trains(platform: platform)[latest_build.train_version].builds.find do |b|
174
+ b.build_version == latest_build.build_version
175
+ end
176
+
177
+ UI.message("Waiting for iTunes Connect to finish processing the new build (#{latest_build.train_version} - #{latest_build.build_version})")
178
+ sleep(wait_processing_interval)
179
+ end
180
+
181
+ if full_build && !full_build.processing && full_build.valid
182
+ minutes = ((Time.now - start) / 60).round
183
+ UI.success("Successfully finished processing the build")
184
+ UI.message("You can now tweet: ")
185
+ UI.important("iTunes Connect #iosprocessingtime #{minutes} minutes")
186
+ return full_build
187
+ else
188
+ UI.user_error!("Error: Seems like iTunes Connect didn't properly pre-process the binary")
189
+ end
190
+ end
191
+
126
192
  def distribute_build(uploaded_build, options)
127
193
  UI.message("Distributing new build to testers")
128
194
 
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: 2.19.0.beta.20170222010016
4
+ version: 2.19.0.beta.20170223010028
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2017-02-22 00:00:00.000000000 Z
17
+ date: 2017-02-23 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: slack-notifier
@@ -1023,7 +1023,6 @@ files:
1023
1023
  - fastlane_core/README.md
1024
1024
  - fastlane_core/lib/assets/XMLTemplate.xml.erb
1025
1025
  - fastlane_core/lib/fastlane_core.rb
1026
- - fastlane_core/lib/fastlane_core/build_watcher.rb
1027
1026
  - fastlane_core/lib/fastlane_core/cert_checker.rb
1028
1027
  - fastlane_core/lib/fastlane_core/command_executor.rb
1029
1028
  - fastlane_core/lib/fastlane_core/configuration/commander_generator.rb
@@ -1295,23 +1294,23 @@ metadata: {}
1295
1294
  post_install_message:
1296
1295
  rdoc_options: []
1297
1296
  require_paths:
1298
- - cert/lib
1299
- - scan/lib
1300
- - pem/lib
1301
- - deliver/lib
1302
- - spaceship/lib
1303
- - pilot/lib
1304
- - sigh/lib
1305
- - snapshot/lib
1306
1297
  - credentials_manager/lib
1298
+ - scan/lib
1307
1299
  - supply/lib
1308
- - frameit/lib
1300
+ - fastlane/lib
1301
+ - spaceship/lib
1309
1302
  - match/lib
1310
- - gym/lib
1303
+ - snapshot/lib
1311
1304
  - fastlane_core/lib
1312
- - fastlane/lib
1313
- - produce/lib
1314
1305
  - screengrab/lib
1306
+ - pilot/lib
1307
+ - produce/lib
1308
+ - pem/lib
1309
+ - gym/lib
1310
+ - deliver/lib
1311
+ - frameit/lib
1312
+ - sigh/lib
1313
+ - cert/lib
1315
1314
  required_ruby_version: !ruby/object:Gem::Requirement
1316
1315
  requirements:
1317
1316
  - - ">="
@@ -1,80 +0,0 @@
1
- module FastlaneCore
2
- class BuildWatcher
3
- def self.find_build(app = nil)
4
- build = nil
5
- app.latest_version.candidate_builds.each do |b|
6
- if !build or b.upload_date > build.upload_date
7
- build = b
8
- end
9
- end
10
- unless build
11
- UI.user_error!("No processing builds available for app #{app.bundle_id}")
12
- end
13
- return build
14
- end
15
-
16
- def self.wait_for_train(app = nil, platform = "ios", sleep_time = 30)
17
- loop do
18
- sleep(sleep_time)
19
- if app.build_trains(platform: platform).count == 0
20
- UI.message("New application; waiting for build train to appear on iTunes Connect")
21
- else
22
- break
23
- end
24
- end
25
- end
26
-
27
- def self.wait_for_build(app = nil, platform = "ios", sleep_time = 0)
28
- start_time = Time.now
29
- UI.user_error!("Could not find app with app identifier #{app.bundle_id}") unless app
30
- # if this is a new version/app wait for train to show up.
31
- if app.build_trains(platform: platform).count == 0
32
- self.class.wait_for_train(app, platform, sleep_time)
33
- end
34
-
35
- latest_build = nil
36
- loop do
37
- if sleep_time > 0
38
- sleep(sleep_time)
39
- else
40
- return nil
41
- end
42
- builds = app.all_processing_builds(platform: platform)
43
- break if builds.count == 0
44
- latest_build = builds.last
45
- UI.message("Waiting for iTunes Connect to finish processing the new build (#{latest_build.train_version} - #{latest_build.build_version})")
46
- end
47
-
48
- UI.user_error!("Error receiving the newly uploaded binary, please check iTunes Connect") if latest_build.nil?
49
- full_build = nil
50
-
51
- while full_build.nil? || full_build.processing
52
- # The build's processing state should go from true to false, and be done. But sometimes it goes true -> false ->
53
- # true -> false, where the second true is transient. This causes a spurious failure. Find build by build_version
54
- # and ensure it's not processing before proceeding - it had to have already been false before, to get out of the
55
- # previous loop.
56
- full_build = app.build_trains(platform: platform)[latest_build.train_version].builds.find do |b|
57
- b.build_version == latest_build.build_version
58
- end
59
- if sleep_time > 0
60
- UI.message("Waiting for iTunes Connect to finish processing the new build (#{latest_build.train_version} - #{latest_build.build_version})")
61
- sleep(sleep_time)
62
- else
63
- return nil
64
- end
65
- end
66
-
67
- if full_build && !full_build.processing && full_build.valid
68
- minutes = ((Time.now - start_time) / 60).round
69
- UI.success("Successfully finished processing the build")
70
- UI.message("You can now tweet: ")
71
- UI.important("iTunes Connect #iosprocessingtime #{minutes} minutes")
72
- return full_build
73
- else
74
- UI.user_error!("Error: Seems like iTunes Connect didn't properly pre-process the binary")
75
- end
76
- end
77
-
78
- private_class_method :wait_for_train
79
- end
80
- end