fastlane 2.40.0.beta.20170620010029 → 2.40.0.beta.20170621010038
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/supply/lib/supply/client.rb +4 -2
- data/supply/lib/supply/options.rb +7 -1
- data/supply/lib/supply/uploader.rb +36 -0
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1aecac2c764541b3681eedd9f44827843c3403f9
|
4
|
+
data.tar.gz: c4ff9cacb874e3a827fe12cabaee41d0ede44709
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f48d61a68aa009829cca85280ea29a59aa00a54f30ca788de4031d3bb96c14e8ac023a613df874e806908b90403dc1ad96744c9a139a24528ac6921240e5b36
|
7
|
+
data.tar.gz: 0b45be6c7d0609f8d3c8118efd4bbc2c6422b7fc306d344a0708c248f51e0b0482dc0a972e34689b65f0e9dd446aceb1a799e7bea63acb848019df2d8ac3d1ba
|
data/supply/lib/supply/client.rb
CHANGED
@@ -268,9 +268,11 @@ module Supply
|
|
268
268
|
current_edit.id,
|
269
269
|
track
|
270
270
|
)
|
271
|
+
return result.version_codes
|
272
|
+
rescue Google::Apis::ClientError => e
|
273
|
+
return [] if e.status_code == 404 && e.to_s.include?("trackEmpty")
|
274
|
+
raise
|
271
275
|
end
|
272
|
-
|
273
|
-
return result.version_codes
|
274
276
|
end
|
275
277
|
|
276
278
|
def update_apk_listing_for_language(apk_listing)
|
@@ -172,7 +172,13 @@ module Supply
|
|
172
172
|
optional: true,
|
173
173
|
verify_block: proc do |value|
|
174
174
|
UI.user_error! "Could not parse URL '#{value}'" unless value =~ URI.regexp
|
175
|
-
end)
|
175
|
+
end),
|
176
|
+
FastlaneCore::ConfigItem.new(key: :check_superseded_tracks,
|
177
|
+
env_name: "SUPPLY_CHECK_SUPERSEDED_TRACKS",
|
178
|
+
optional: true,
|
179
|
+
description: "Check the other tracks for superseded versions and disable them",
|
180
|
+
is_string: false,
|
181
|
+
default_value: false)
|
176
182
|
|
177
183
|
]
|
178
184
|
end
|
@@ -158,10 +158,46 @@ module Supply
|
|
158
158
|
if Supply.config[:track].eql? "rollout"
|
159
159
|
client.update_track(Supply.config[:track], Supply.config[:rollout], apk_version_codes)
|
160
160
|
else
|
161
|
+
check_superseded_tracks(apk_version_codes) if Supply.config[:check_superseded_tracks]
|
161
162
|
client.update_track(Supply.config[:track], 1.0, apk_version_codes)
|
162
163
|
end
|
163
164
|
end
|
164
165
|
|
166
|
+
# Remove any version codes that is:
|
167
|
+
# - Lesser than the greatest of any later (i.e. production) track
|
168
|
+
# - Or lesser than the currently being uploaded if it's in an earlier (i.e. alpha) track
|
169
|
+
def check_superseded_tracks(apk_version_codes)
|
170
|
+
UI.message("Checking superseded tracks...")
|
171
|
+
max_apk_version_code = apk_version_codes.max
|
172
|
+
max_tracks_version_code = nil
|
173
|
+
|
174
|
+
tracks = ["production", "beta", "alpha"]
|
175
|
+
config_track_index = tracks.index(Supply.config[:track])
|
176
|
+
|
177
|
+
tracks.each_index do |track_index|
|
178
|
+
next if track_index.eql? config_track_index
|
179
|
+
track = tracks[track_index]
|
180
|
+
|
181
|
+
track_version_codes = client.track_version_codes(track).sort
|
182
|
+
next if track_version_codes.empty?
|
183
|
+
|
184
|
+
if max_tracks_version_code.nil?
|
185
|
+
max_tracks_version_code = track_version_codes.max
|
186
|
+
else
|
187
|
+
removed_version_codes = track_version_codes.take_while do |v|
|
188
|
+
v < max_tracks_version_code || (v < max_apk_version_code && track_index > config_track_index)
|
189
|
+
end
|
190
|
+
|
191
|
+
unless removed_version_codes.empty?
|
192
|
+
keep_version_codes = track_version_codes - removed_version_codes
|
193
|
+
max_tracks_version_code = keep_version_codes[0] unless keep_version_codes.empty?
|
194
|
+
client.update_track(track, 1.0, keep_version_codes)
|
195
|
+
UI.message("Superseded track '#{track}', removed '#{removed_version_codes}'")
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
165
201
|
# returns only language directories from metadata_path
|
166
202
|
def all_languages
|
167
203
|
Dir.entries(metadata_path)
|
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.40.0.beta.
|
4
|
+
version: 2.40.0.beta.20170621010038
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2017-06-
|
18
|
+
date: 2017-06-21 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: slack-notifier
|
@@ -1375,23 +1375,23 @@ metadata:
|
|
1375
1375
|
post_install_message:
|
1376
1376
|
rdoc_options: []
|
1377
1377
|
require_paths:
|
1378
|
-
-
|
1378
|
+
- pilot/lib
|
1379
|
+
- spaceship/lib
|
1379
1380
|
- deliver/lib
|
1380
|
-
-
|
1381
|
+
- pem/lib
|
1382
|
+
- sigh/lib
|
1381
1383
|
- fastlane_core/lib
|
1382
|
-
- match/lib
|
1383
|
-
- pilot/lib
|
1384
1384
|
- produce/lib
|
1385
|
-
-
|
1386
|
-
-
|
1385
|
+
- snapshot/lib
|
1386
|
+
- supply/lib
|
1387
1387
|
- gym/lib
|
1388
|
-
-
|
1389
|
-
- cert/lib
|
1388
|
+
- match/lib
|
1390
1389
|
- fastlane/lib
|
1391
|
-
- spaceship/lib
|
1392
1390
|
- credentials_manager/lib
|
1393
|
-
-
|
1394
|
-
-
|
1391
|
+
- scan/lib
|
1392
|
+
- screengrab/lib
|
1393
|
+
- frameit/lib
|
1394
|
+
- cert/lib
|
1395
1395
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1396
1396
|
requirements:
|
1397
1397
|
- - ">="
|