fastlane 2.65.0.beta.20171113010004 → 2.65.0.beta.20171114010003

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: 2c408eb7ead882ca5d84a83f837d75529b604ad6
4
- data.tar.gz: 0a1d72448e23bcdfc137771310534d7bf6e16437
3
+ metadata.gz: 9320ab6f7ae03020ddcb7b2da70e69a4695f650f
4
+ data.tar.gz: 4a4dd0ba952972ae35413b3b82e1ff8b9afcb1f0
5
5
  SHA512:
6
- metadata.gz: 7c9af371cae9072fd14bee29ab0f059f8a952eb128e88afc4e7a4435f4cf81c3a5970304f03041ed0f4bbcdf1faf73f3d83de9bf6026da5bad6171435c60f82a
7
- data.tar.gz: 0e4d6b340ff3b54c2add547faf57f007d9a785588cd11e540aad60c56231b0fd7272701fca89ace82550f3c572e98f8215b2fb66d886bfb26d21b61d1236e16f
6
+ metadata.gz: 2b1cc2aefc1a6c8561c5a06075cddd573abd7508651137906658b3d8f6348d9c9e6ebbd67a3f4dbda62fe3bbd625ee6ab9f14950bba635743556e526484e0c85
7
+ data.tar.gz: 5ba27066793eafab0abdf17280e4e7c65ca1c6c33c3784e19524f8aa0273c18cb819d0fbb9c5a0d05f11eddfe56fed484002dd03b0b02f4079b567991b7b38b5
@@ -26,22 +26,26 @@ Apple rejects builds for many avoidable metadata issues like including swear wor
26
26
  | | precheck Features |
27
27
  |----------|-----------------|
28
28
  |🐛|  product bug mentions|
29
- |🙅‍♂️|Swear word checker|
29
+ |🙅|Swear word checker|
30
30
  |🤖|Mentioning other platforms|
31
31
  |😵|URL reachability checker|
32
32
  |📝|Placeholder/test words/mentioning future features|
33
33
  |📅|Copyright date checking|
34
34
  |🙈|Customizable word list checking|
35
- |📢|You can decide if you want to warn about potential problems and continue or have _fastlane_ show an error and stop after all scans are done.|
35
+ |📢|You can decide if you want to warn about potential problems and continue or have _fastlane_ show an error and stop after all scans are done|
36
36
 
37
37
  # Usage
38
38
  Run _fastlane precheck_ to check the app metadata from iTunes Connect
39
39
 
40
- fastlane precheck
40
+ ```no-highlight
41
+ fastlane precheck
42
+ ```
41
43
 
42
44
  To get a list of available options run
43
-
44
- fastlane action precheck
45
+
46
+ ```no-highlight
47
+ fastlane action precheck
48
+ ```
45
49
 
46
50
  <img src="/img/actions/precheck.gif" />
47
51
 
@@ -36,6 +36,7 @@ module Fastlane
36
36
  flags = []
37
37
  flags << "-p #{project_dir.shellescape}"
38
38
  flags << params[:properties].map { |k, v| "-P#{k.to_s.shellescape}=#{v.to_s.shellescape}" }.join(' ') unless params[:properties].nil?
39
+ flags << params[:system_properties].map { |k, v| "-D#{k.to_s.shellescape}=#{v.to_s.shellescape}" }.join(' ') unless params[:system_properties].nil?
39
40
  flags << params[:flags] unless params[:flags].nil?
40
41
 
41
42
  # Run the actual gradle task
@@ -125,6 +126,11 @@ module Fastlane
125
126
  description: 'Gradle properties to be exposed to the gradle script',
126
127
  optional: true,
127
128
  is_string: false),
129
+ FastlaneCore::ConfigItem.new(key: :system_properties,
130
+ env_name: 'FL_GRADLE_SYSTEM_PROPERTIES',
131
+ description: 'Gradle system properties to be exposed to the gradle script',
132
+ optional: true,
133
+ is_string: false),
128
134
  FastlaneCore::ConfigItem.new(key: :serial,
129
135
  env_name: 'FL_ANDROID_SERIAL',
130
136
  description: 'Android serial, which device should be used for this command',
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.65.0.beta.20171113010004'.freeze
2
+ VERSION = '2.65.0.beta.20171114010003'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  RUBOCOP_REQUIREMENT = '0.49.1'.freeze
@@ -2,13 +2,21 @@ module FastlaneCore
2
2
  class BuildWatcher
3
3
  class << self
4
4
  # @return The build we waited for. This method will always return a build
5
- def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, poll_interval: 10)
6
- # First, find the train and build version we want to watch for
7
- watched_build = watching_build(app_id: app_id, platform: platform)
8
- UI.crash!("Could not find a build for app: #{app_id} on platform: #{platform}") if watched_build.nil?
5
+ def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, build_version: nil, poll_interval: 10, strict_build_watch: false)
6
+ unless strict_build_watch
7
+ # First, find the train and build version we want to watch for
8
+ watched_build = watching_build(app_id: app_id, platform: platform)
9
+ UI.crash!("Could not find a build for app: #{app_id} on platform: #{platform}") if watched_build.nil?
10
+
11
+ unless watched_build.train_version == train_version && watched_build.build_version == build_version
12
+ UI.important("Started watching build #{watched_build.train_version} - #{watched_build.build_version} but expected #{train_version} - #{build_version}")
13
+ end
14
+ train_version = watched_build.train_version
15
+ build_version = watched_build.build_version
16
+ end
9
17
 
10
18
  loop do
11
- matched_build = matching_build(watched_build: watched_build, app_id: app_id, platform: platform)
19
+ matched_build = matching_build(watched_train_version: train_version, watched_build_version: build_version, app_id: app_id, platform: platform)
12
20
 
13
21
  report_status(build: matched_build)
14
22
 
@@ -29,9 +37,9 @@ module FastlaneCore
29
37
  watched_build || Spaceship::TestFlight::Build.latest(app_id: app_id, platform: platform)
30
38
  end
31
39
 
32
- def matching_build(watched_build: nil, app_id: nil, platform: nil)
33
- matched_builds = Spaceship::TestFlight::Build.builds_for_train(app_id: app_id, platform: platform, train_version: watched_build.train_version, retry_count: 2)
34
- matched_builds.find { |build| build.build_version == watched_build.build_version }
40
+ def matching_build(watched_train_version: nil, watched_build_version: nil, app_id: nil, platform: nil)
41
+ matched_builds = Spaceship::TestFlight::Build.builds_for_train(app_id: app_id, platform: platform, train_version: watched_train_version, retry_count: 2)
42
+ matched_builds.find { |build| build.build_version == watched_build_version }
35
43
  end
36
44
 
37
45
  def report_status(build: nil)
@@ -44,7 +52,7 @@ module FastlaneCore
44
52
  UI.message("Build doesn't show up in the build list anymore, waiting for it to appear again")
45
53
  elsif build.active?
46
54
  UI.success("Build #{build.train_version} - #{build.build_version} is already being tested")
47
- elsif build.ready_to_submit? || build.export_compliance_missing?
55
+ elsif build.ready_to_submit? || build.export_compliance_missing? || build.review_rejected?
48
56
  UI.success("Successfully finished processing the build #{build.train_version} - #{build.build_version}")
49
57
  else
50
58
  UI.message("Waiting for iTunes Connect to finish processing the new build (#{build.train_version} - #{build.build_version})")
@@ -17,6 +17,13 @@ module FastlaneCore
17
17
  return nil
18
18
  end
19
19
 
20
+ # Fetches the app build number from the given ipa file.
21
+ def self.fetch_app_build(path)
22
+ plist = self.fetch_info_plist_file(path)
23
+ return plist['CFBundleVersion'] if plist
24
+ return nil
25
+ end
26
+
20
27
  # Fetches the app platform from the given ipa file.
21
28
  def self.fetch_app_platform(path)
22
29
  plist = self.fetch_info_plist_file(path)
@@ -35,7 +35,13 @@ module Pilot
35
35
  end
36
36
 
37
37
  UI.message("If you want to skip waiting for the processing to be finished, use the `skip_waiting_for_build_processing` option")
38
- latest_build = FastlaneCore::BuildWatcher.wait_for_build_processing_to_be_complete(app_id: app.apple_id, platform: platform, poll_interval: config[:wait_processing_interval])
38
+ app_version = FastlaneCore::IpaFileAnalyser.fetch_app_version(config[:ipa])
39
+ app_build = FastlaneCore::IpaFileAnalyser.fetch_app_build(config[:ipa])
40
+ latest_build = FastlaneCore::BuildWatcher.wait_for_build_processing_to_be_complete(app_id: app.apple_id, platform: platform, train_version: app_version, build_version: app_build, poll_interval: config[:wait_processing_interval], strict_build_watch: config[:wait_for_uploaded_build])
41
+
42
+ unless latest_build.train_version == app_version && latest_build.build_version == app_build
43
+ UI.important("Uploaded app #{app_version} - #{app_build}, but received build #{latest_build.train_version} - #{latest_build.build_version}. If you want to wait for uploaded build to be finished processing, use the `wait_for_uploaded_build` option")
44
+ end
39
45
 
40
46
  distribute(options, build: latest_build)
41
47
  end
@@ -158,7 +158,12 @@ module Pilot
158
158
  type: Array,
159
159
  verify_block: proc do |value|
160
160
  UI.user_error!("Could not evaluate array from '#{value}'") unless value.kind_of?(Array)
161
- end)
161
+ end),
162
+ FastlaneCore::ConfigItem.new(key: :wait_for_uploaded_build,
163
+ env_name: "PILOT_WAIT_FOR_UPLOADED_BUILD",
164
+ description: "Use version info from uploaded ipa file to determine what build to use for distribution. If set to false, latest processing or any latest build will be used",
165
+ is_string: false,
166
+ default_value: false)
162
167
  ]
163
168
  end
164
169
  end
@@ -24,7 +24,9 @@ module Precheck
24
24
  return RuleReturn.new(validation_state: Precheck::VALIDATION_STATES[:failed], failure_data: "empty url") if url.empty?
25
25
 
26
26
  begin
27
- request = Faraday.new(URI.encode(url)) do |connection|
27
+ uri = Addressable::URI.parse(url)
28
+ uri.fragment = nil
29
+ request = Faraday.new(URI.encode(uri.to_s)) do |connection|
28
30
  connection.use FaradayMiddleware::FollowRedirects
29
31
  connection.adapter :net_http
30
32
  end
@@ -69,7 +69,8 @@ module Spaceship::TestFlight
69
69
  active: 'testflight.build.state.testing.active',
70
70
  ready_to_submit: 'testflight.build.state.submit.ready',
71
71
  ready_to_test: 'testflight.build.state.testing.ready',
72
- export_compliance_missing: 'testflight.build.state.export.compliance.missing'
72
+ export_compliance_missing: 'testflight.build.state.export.compliance.missing',
73
+ review_rejected: 'testflight.build.state.review.rejected'
73
74
  }
74
75
 
75
76
  # Find a Build by `build_id`.
@@ -130,8 +131,12 @@ module Spaceship::TestFlight
130
131
  external_state == BUILD_STATES[:export_compliance_missing]
131
132
  end
132
133
 
134
+ def review_rejected?
135
+ external_state == BUILD_STATES[:review_rejected]
136
+ end
137
+
133
138
  def processed?
134
- active? || ready_to_submit? || export_compliance_missing?
139
+ active? || ready_to_submit? || export_compliance_missing? || review_rejected?
135
140
  end
136
141
 
137
142
  # Getting builds from BuildTrains only gets a partial Build object
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.65.0.beta.20171113010004
4
+ version: 2.65.0.beta.20171114010003
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-11-13 00:00:00.000000000 Z
18
+ date: 2017-11-14 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier