fastlane 2.38.0.beta.20170607010024 → 2.38.0.beta.20170608010030

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: 11620e63584ea3d61e0322ad5ab0a69061c97e08
4
- data.tar.gz: decaded040f2b6033e6ea4a07cf163285c4cb4a3
3
+ metadata.gz: 6d9ed994f6a7c303ebebcad4f91a1ff719d2ddfa
4
+ data.tar.gz: e32e577d86a1647927fca115835de93ca7d830bb
5
5
  SHA512:
6
- metadata.gz: e8efa8648538ac6741259007fa25f8a275d607a9ab3fafc0c90a58e9dedd3d4d91dbdbbd58b3f7ba25159b8615ff25cb04c80ba459b28a00c5b4bad0bd2e7483
7
- data.tar.gz: f5d7a25a36a68e51e0803f6c9b7e4ff02638591a15a9160a8bb26524fa56ae7bf781ffa562d861e59e1ae18f9368f8987c316b7abc900ab99970b8c65778d5c8
6
+ metadata.gz: a133f153833792c0b836cc3cd572de440d3653a01537084601227b09561c8a612c9f015bed6a192389e70b6145901a8c7661c666ead3b707b519c253b468d265
7
+ data.tar.gz: 7d0db64c90ea2273bbdab7b2efc746b1d9b20b5f825d80c144cf09117aab24b93b7841303d4d506621d6f41e8fc8f02b53d8d15bf07840d4e6fa04def077e010
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '2.38.0.beta.20170607010024'.freeze
2
+ VERSION = '2.38.0.beta.20170608010030'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  end
@@ -40,7 +40,6 @@ module Gym
40
40
  options << "-archivePath #{archive_path.shellescape}"
41
41
  options << "-derivedDataPath '#{config[:derived_data_path]}'" if config[:derived_data_path]
42
42
  options << "-resultBundlePath '#{result_bundle_path}'" if config[:result_bundle]
43
- options << "-UseNewBuildSystem=YES" if config[:new_build_system]
44
43
  options << config[:xcargs] if config[:xcargs]
45
44
  options << "OTHER_SWIFT_FLAGS=\"\$(inherited) -Xfrontend -debug-time-function-bodies\"" if config[:analyze_build_time]
46
45
 
@@ -277,14 +277,7 @@ module Gym
277
277
  env_name: "XCPRETTY_UTF",
278
278
  description: "Have xcpretty use unicode encoding when reporting builds",
279
279
  optional: true,
280
- is_string: false),
281
- FastlaneCore::ConfigItem.new(key: :new_build_system,
282
- short_option: "-N",
283
- env_name: "GYM_NEW_BUILD_SYSTEM",
284
- is_string: false,
285
- description: "Use new Build System currently in preview on Xcode>=9",
286
- optional: true)
287
-
280
+ is_string: false)
288
281
  ]
289
282
  end
290
283
  end
@@ -68,8 +68,9 @@ module Supply
68
68
 
69
69
  Google::Apis::ClientOptions.default.application_name = "fastlane - supply"
70
70
  Google::Apis::ClientOptions.default.application_version = Fastlane::VERSION
71
- Google::Apis::RequestOptions.default.timeout_sec = 300
72
- Google::Apis::RequestOptions.default.open_timeout_sec = 300
71
+ Google::Apis::ClientOptions.default.read_timeout_sec = 300
72
+ Google::Apis::ClientOptions.default.open_timeout_sec = 300
73
+ Google::Apis::ClientOptions.default.send_timeout_sec = 300
73
74
  Google::Apis::RequestOptions.default.retries = 5
74
75
 
75
76
  self.android_publisher = Androidpublisher::AndroidPublisherService.new
@@ -262,15 +263,17 @@ module Supply
262
263
  def track_version_codes(track)
263
264
  ensure_active_edit!
264
265
 
265
- result = call_google_api do
266
- android_publisher.get_track(
266
+ begin
267
+ result = android_publisher.get_track(
267
268
  current_package_name,
268
269
  current_edit.id,
269
270
  track
270
271
  )
272
+ return result.version_codes
273
+ rescue Google::Apis::ClientError => e
274
+ return [] if e.status_code == 404 && e.to_s.include?("trackEmpty")
275
+ raise
271
276
  end
272
-
273
- return result.version_codes
274
277
  end
275
278
 
276
279
  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.38.0.beta.20170607010024
4
+ version: 2.38.0.beta.20170608010030
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-07 00:00:00.000000000 Z
18
+ date: 2017-06-08 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier
@@ -347,14 +347,14 @@ dependencies:
347
347
  requirements:
348
348
  - - "~>"
349
349
  - !ruby/object:Gem::Version
350
- version: 0.9.2
350
+ version: '0.11'
351
351
  type: :runtime
352
352
  prerelease: false
353
353
  version_requirements: !ruby/object:Gem::Requirement
354
354
  requirements:
355
355
  - - "~>"
356
356
  - !ruby/object:Gem::Version
357
- version: 0.9.2
357
+ version: '0.11'
358
358
  - !ruby/object:Gem::Dependency
359
359
  name: highline
360
360
  requirement: !ruby/object:Gem::Requirement
@@ -1369,21 +1369,21 @@ post_install_message:
1369
1369
  rdoc_options: []
1370
1370
  require_paths:
1371
1371
  - credentials_manager/lib
1372
- - scan/lib
1373
- - spaceship/lib
1374
1372
  - fastlane/lib
1375
- - deliver/lib
1376
- - supply/lib
1377
1373
  - sigh/lib
1378
- - produce/lib
1379
- - fastlane_core/lib
1380
- - snapshot/lib
1381
- - frameit/lib
1382
1374
  - cert/lib
1383
- - gym/lib
1384
- - match/lib
1375
+ - scan/lib
1385
1376
  - screengrab/lib
1377
+ - supply/lib
1378
+ - match/lib
1386
1379
  - pem/lib
1380
+ - spaceship/lib
1381
+ - fastlane_core/lib
1382
+ - frameit/lib
1383
+ - produce/lib
1384
+ - snapshot/lib
1385
+ - deliver/lib
1386
+ - gym/lib
1387
1387
  - pilot/lib
1388
1388
  required_ruby_version: !ruby/object:Gem::Requirement
1389
1389
  requirements: