fastlane 2.18.0.beta.20170221010026 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/deliver/lib/deliver/submit_for_review.rb +1 -36
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane_core/lib/fastlane_core.rb +1 -0
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +80 -0
- data/frameit/lib/frameit/config_parser.rb +2 -0
- data/frameit/lib/frameit/editor.rb +13 -9
- data/pilot/lib/pilot/build_manager.rb +1 -67
- metadata +18 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a29078a37207ab9214712b179c10bd4e19a2230
|
4
|
+
data.tar.gz: 0806a47c7d815b2d295cfe379c58a309f902c407
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afe8839af19b3dae4cc5b523060cf93d7b47bb029d1a2501ebed6db716121d1fdfa23db2fe6c260e234f30aa38173f602c100a1d357c1cfda0a383cddfcbca81
|
7
|
+
data.tar.gz: 55e9c61cd96f60a790c5940dc00f871042a18d5ea34cc2430ba3c6ac4b64f8663f99bd5d806e294bad1f4660e61983436641b009d5f1f7bdf19361d11961f73c
|
@@ -39,7 +39,7 @@ module Deliver
|
|
39
39
|
end
|
40
40
|
else
|
41
41
|
UI.message("Selecting the latest build...")
|
42
|
-
build = wait_for_build(app)
|
42
|
+
build = FastlaneCore::BuildWatcher.wait_for_build(app, options[:app_platform], sleep_time)
|
43
43
|
end
|
44
44
|
UI.message("Selecting build #{build.train_version} (#{build.build_version})...")
|
45
45
|
|
@@ -48,40 +48,5 @@ 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
|
86
51
|
end
|
87
52
|
end
|
@@ -5,6 +5,7 @@ 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'
|
8
9
|
require 'fastlane_core/env'
|
9
10
|
require 'fastlane_core/feature/feature'
|
10
11
|
require 'fastlane_core/features'
|
@@ -0,0 +1,80 @@
|
|
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
|
@@ -83,6 +83,8 @@ module Frameit
|
|
83
83
|
unless value.kind_of?(Integer) || value.split('x').length == 2 || (value.end_with?('%') && value.to_f > 0)
|
84
84
|
UI.user_error!("padding must be type integer or pair of integers of format 'AxB' or a percentage of screen size")
|
85
85
|
end
|
86
|
+
when 'show_complete_frame'
|
87
|
+
UI.user_error! "show_complete_frame must be a Boolean" unless [true, false].include?(value)
|
86
88
|
when 'font_scale_factor'
|
87
89
|
UI.user_error!("font_scale_factor must be numeric") unless value.kind_of?(Numeric)
|
88
90
|
end
|
@@ -117,9 +117,19 @@ module Frameit
|
|
117
117
|
# Decrease the size of the framed screenshot to fit into the defined padding + background
|
118
118
|
frame_width = background.width - horizontal_frame_padding * 2
|
119
119
|
frame_height = background.height - top_space_above_device - vertical_frame_padding
|
120
|
-
|
121
|
-
if
|
122
|
-
|
120
|
+
|
121
|
+
if fetch_config['show_complete_frame']
|
122
|
+
# calculate the final size of the screenshot to resize in one go
|
123
|
+
# it may be limited either by the width or height of the frame
|
124
|
+
image_aspect_ratio = @image.width.to_f / @image.height.to_f
|
125
|
+
image_width = [frame_width, @image.width].min
|
126
|
+
image_height = [frame_height, image_width / image_aspect_ratio].min
|
127
|
+
image_width = image_height * image_aspect_ratio
|
128
|
+
@image.resize "#{image_width}x#{image_height}" if image_width < @image.width || image_height < @image.height
|
129
|
+
else
|
130
|
+
# the screenshot size is only limited by width.
|
131
|
+
# If higher than the frame, the screenshot is cut off at the bottom
|
132
|
+
@image.resize "#{frame_width}x" if frame_width < @image.width
|
123
133
|
end
|
124
134
|
end
|
125
135
|
|
@@ -166,12 +176,6 @@ module Frameit
|
|
166
176
|
end
|
167
177
|
|
168
178
|
def put_device_into_background(background)
|
169
|
-
show_complete_frame = fetch_config['show_complete_frame']
|
170
|
-
if show_complete_frame
|
171
|
-
max_height = background.height - top_space_above_device
|
172
|
-
image.resize "x#{max_height}>"
|
173
|
-
end
|
174
|
-
|
175
179
|
left_space = (background.width / 2.0 - image.width / 2.0).round
|
176
180
|
|
177
181
|
@image = background.composite(image, "png") do |c|
|
@@ -31,8 +31,7 @@ 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 =
|
35
|
-
|
34
|
+
uploaded_build = FastlaneCore::BuildWatcher.wait_for_build(app, platform, config[:wait_processing_interval].to_i)
|
36
35
|
distribute(options, uploaded_build)
|
37
36
|
end
|
38
37
|
|
@@ -124,71 +123,6 @@ module Pilot
|
|
124
123
|
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
|
125
124
|
end
|
126
125
|
|
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
|
-
|
192
126
|
def distribute_build(uploaded_build, options)
|
193
127
|
UI.message("Distributing new build to testers")
|
194
128
|
|
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.18.0
|
4
|
+
version: 2.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
@@ -1023,6 +1023,7 @@ 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
|
1026
1027
|
- fastlane_core/lib/fastlane_core/cert_checker.rb
|
1027
1028
|
- fastlane_core/lib/fastlane_core/command_executor.rb
|
1028
1029
|
- fastlane_core/lib/fastlane_core/configuration/commander_generator.rb
|
@@ -1294,23 +1295,23 @@ metadata: {}
|
|
1294
1295
|
post_install_message:
|
1295
1296
|
rdoc_options: []
|
1296
1297
|
require_paths:
|
1297
|
-
-
|
1298
|
-
- scan/lib
|
1299
|
-
- gym/lib
|
1300
|
-
- spaceship/lib
|
1301
|
-
- snapshot/lib
|
1302
|
-
- pem/lib
|
1303
|
-
- screengrab/lib
|
1304
|
-
- frameit/lib
|
1298
|
+
- cert/lib
|
1305
1299
|
- credentials_manager/lib
|
1300
|
+
- deliver/lib
|
1306
1301
|
- fastlane/lib
|
1307
|
-
- match/lib
|
1308
|
-
- cert/lib
|
1309
1302
|
- fastlane_core/lib
|
1310
|
-
-
|
1303
|
+
- frameit/lib
|
1304
|
+
- gym/lib
|
1305
|
+
- match/lib
|
1306
|
+
- pem/lib
|
1307
|
+
- pilot/lib
|
1311
1308
|
- produce/lib
|
1309
|
+
- scan/lib
|
1310
|
+
- screengrab/lib
|
1312
1311
|
- sigh/lib
|
1313
|
-
-
|
1312
|
+
- snapshot/lib
|
1313
|
+
- spaceship/lib
|
1314
|
+
- supply/lib
|
1314
1315
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1315
1316
|
requirements:
|
1316
1317
|
- - ">="
|
@@ -1318,14 +1319,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1318
1319
|
version: 2.0.0
|
1319
1320
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1320
1321
|
requirements:
|
1321
|
-
- - "
|
1322
|
+
- - ">="
|
1322
1323
|
- !ruby/object:Gem::Version
|
1323
|
-
version:
|
1324
|
+
version: '0'
|
1324
1325
|
requirements: []
|
1325
1326
|
rubyforge_project:
|
1326
|
-
rubygems_version: 2.
|
1327
|
+
rubygems_version: 2.5.1
|
1327
1328
|
signing_key:
|
1328
1329
|
specification_version: 4
|
1329
1330
|
summary: The easiest way to automate beta deployments and releases for your iOS and
|
1330
1331
|
Android apps
|
1331
1332
|
test_files: []
|
1333
|
+
has_rdoc:
|