fastlane 2.118.0.beta.20190314200016 → 2.118.0.beta.20190315200105
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/fastlane/lib/fastlane/version.rb +1 -1
- data/pilot/lib/pilot/build_manager.rb +24 -7
- data/pilot/lib/pilot/options.rb +6 -0
- data/snapshot/lib/assets/SnapshotHelper.swift +17 -3
- data/spaceship/lib/spaceship/connect_api/client.rb +21 -0
- data/spaceship/lib/spaceship/test_flight/build.rb +7 -3
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8068e89b3f12ff2ac5b7bcfde2a67348fd6ffdca
|
4
|
+
data.tar.gz: 436903e09ea72d51e5f2cbd1b1a02ca346f4dce7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57806cde3a09796c20a42767d08f95cbc543c134f2a51c04ddb9c9e04cf5ed45ee938f83055a3d0e0c48578fc296dbe7dba6f92254fff03e28e59aaffa334d1f
|
7
|
+
data.tar.gz: bae632239408a02afbdd7ebd3b06c22b42370ae44eaabfaaf0b685a4b2906136e92f7df0d4d0f3b09096a55844a1b3b7c3d003195f261281ea097688db05c53c
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Fastlane
|
2
|
-
VERSION = '2.118.0.beta.
|
2
|
+
VERSION = '2.118.0.beta.20190315200105'.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
|
@@ -50,6 +50,12 @@ module Pilot
|
|
50
50
|
end
|
51
51
|
|
52
52
|
UI.message("If you want to skip waiting for the processing to be finished, use the `skip_waiting_for_build_processing` option")
|
53
|
+
latest_build = wait_for_build_processing_to_be_complete
|
54
|
+
distribute(options, build: latest_build)
|
55
|
+
end
|
56
|
+
|
57
|
+
def wait_for_build_processing_to_be_complete
|
58
|
+
platform = fetch_app_platform
|
53
59
|
app_version = FastlaneCore::IpaFileAnalyser.fetch_app_version(config[:ipa])
|
54
60
|
app_build = FastlaneCore::IpaFileAnalyser.fetch_app_build(config[:ipa])
|
55
61
|
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])
|
@@ -58,7 +64,7 @@ module Pilot
|
|
58
64
|
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")
|
59
65
|
end
|
60
66
|
|
61
|
-
|
67
|
+
return latest_build
|
62
68
|
end
|
63
69
|
|
64
70
|
def distribute(options, build: nil)
|
@@ -210,7 +216,7 @@ module Pilot
|
|
210
216
|
UI.message("Distributing new build to testers: #{uploaded_build.train_version} - #{uploaded_build.build_version}")
|
211
217
|
|
212
218
|
# This is where we could add a check to see if encryption is required and has been updated
|
213
|
-
uploaded_build
|
219
|
+
set_export_compliance_if_needed(uploaded_build, options)
|
214
220
|
|
215
221
|
if options[:groups] || options[:distribute_external]
|
216
222
|
begin
|
@@ -241,16 +247,27 @@ module Pilot
|
|
241
247
|
if external_group.nil? && options[:groups].nil?
|
242
248
|
UI.user_error!("You must specify at least one group using the `:groups` option to distribute externally")
|
243
249
|
end
|
244
|
-
else # distribute internally
|
245
|
-
# in case any changes to export_compliance are required
|
246
|
-
if uploaded_build.export_compliance_missing?
|
247
|
-
uploaded_build.save!
|
248
|
-
end
|
249
250
|
end
|
250
251
|
|
251
252
|
true
|
252
253
|
end
|
253
254
|
|
255
|
+
def set_export_compliance_if_needed(uploaded_build, options)
|
256
|
+
build = uploaded_build.find_app_store_connect_build
|
257
|
+
build_attributes = build["attributes"] || {}
|
258
|
+
if build_attributes["usesNonExemptEncryption"].nil?
|
259
|
+
uses_non_exempt_encryption = options[:uses_non_exempt_encryption]
|
260
|
+
attributes = { usesNonExemptEncryption: uses_non_exempt_encryption }
|
261
|
+
|
262
|
+
client = Spaceship::ConnectAPI::Base.client
|
263
|
+
client.patch_builds(build_id: build["id"], attributes: attributes)
|
264
|
+
|
265
|
+
UI.important("Export comlpiance has been set to '#{uses_non_exempt_encryption}'. Need to wait for build to finishing processing again...")
|
266
|
+
UI.important("Set 'ITSAppUsesNonExemptEncryption' in the 'Info.plist' to skip this step and speed up the submission")
|
267
|
+
wait_for_build_processing_to_be_complete
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
254
271
|
def update_review_detail(app_id, info)
|
255
272
|
info = info.collect { |k, v| [k.to_sym, v] }.to_h
|
256
273
|
|
data/pilot/lib/pilot/options.rb
CHANGED
@@ -134,6 +134,12 @@ module Pilot
|
|
134
134
|
default_value: false),
|
135
135
|
|
136
136
|
# distribution
|
137
|
+
FastlaneCore::ConfigItem.new(key: :uses_non_exempt_encryption,
|
138
|
+
short_option: "-X",
|
139
|
+
env_name: "PILOT_USES_NON_EXEMPT_ENCRYPTION",
|
140
|
+
description: "Provide the 'Uses Non-Exempt Encryption' for export compliance. This is used if there is 'ITSAppUsesNonExemptEncryption' is not set in the Info.plist",
|
141
|
+
default_value: false,
|
142
|
+
type: Boolean),
|
137
143
|
FastlaneCore::ConfigItem.new(key: :distribute_external,
|
138
144
|
is_string: false,
|
139
145
|
env_name: "PILOT_DISTRIBUTE_EXTERNAL",
|
@@ -156,7 +156,12 @@ open class Snapshot: NSObject {
|
|
156
156
|
sleep(1) // Waiting for the animation to be finished (kind of)
|
157
157
|
|
158
158
|
#if os(OSX)
|
159
|
-
|
159
|
+
guard let app = self.app else {
|
160
|
+
print("XCUIApplication is not set. Please call setupSnapshot(app) before snapshot().")
|
161
|
+
return
|
162
|
+
}
|
163
|
+
|
164
|
+
app.typeKey(XCUIKeyboardKeySecondaryFn, modifierFlags: [])
|
160
165
|
#else
|
161
166
|
|
162
167
|
guard let app = self.app else {
|
@@ -182,7 +187,12 @@ open class Snapshot: NSObject {
|
|
182
187
|
return
|
183
188
|
#endif
|
184
189
|
|
185
|
-
let
|
190
|
+
guard let app = self.app else {
|
191
|
+
print("XCUIApplication is not set. Please call setupSnapshot(app) before snapshot().")
|
192
|
+
return
|
193
|
+
}
|
194
|
+
|
195
|
+
let networkLoadingIndicator = app.otherElements.deviceStatusBars.networkLoadingIndicators.element
|
186
196
|
let networkLoadingIndicatorDisappeared = XCTNSPredicateExpectation(predicate: NSPredicate(format: "exists == false"), object: networkLoadingIndicator)
|
187
197
|
_ = XCTWaiter.wait(for: [networkLoadingIndicatorDisappeared], timeout: timeout)
|
188
198
|
}
|
@@ -257,7 +267,11 @@ private extension XCUIElementQuery {
|
|
257
267
|
}
|
258
268
|
|
259
269
|
var deviceStatusBars: XCUIElementQuery {
|
260
|
-
let
|
270
|
+
guard let app = Snapshot.app else {
|
271
|
+
fatalError("XCUIApplication is not set. Please call setupSnapshot(app) before snapshot().")
|
272
|
+
}
|
273
|
+
|
274
|
+
let deviceWidth = app.windows.firstMatch.frame.width
|
261
275
|
|
262
276
|
let isStatusBar = NSPredicate { (evaluatedObject, _) in
|
263
277
|
guard let element = evaluatedObject as? XCUIElementAttributes else { return false }
|
@@ -230,6 +230,27 @@ module Spaceship
|
|
230
230
|
handle_response(response)
|
231
231
|
end
|
232
232
|
|
233
|
+
def patch_builds(build_id: nil, attributes: {})
|
234
|
+
# PATCH
|
235
|
+
# https://appstoreconnect.apple.com/iris/v1/builds/<build_id>
|
236
|
+
path = "builds/#{build_id}"
|
237
|
+
|
238
|
+
body = {
|
239
|
+
data: {
|
240
|
+
attributes: attributes,
|
241
|
+
id: build_id,
|
242
|
+
type: "builds"
|
243
|
+
}
|
244
|
+
}
|
245
|
+
|
246
|
+
response = request(:patch) do |req|
|
247
|
+
req.url(path)
|
248
|
+
req.body = body.to_json
|
249
|
+
req.headers['Content-Type'] = 'application/json'
|
250
|
+
end
|
251
|
+
handle_response(response)
|
252
|
+
end
|
253
|
+
|
233
254
|
def post_beta_app_review_submissions(build_id: nil)
|
234
255
|
# POST
|
235
256
|
# https://appstoreconnect.apple.com/iris/v1/betaAppReviewSubmissions
|
@@ -217,9 +217,7 @@ module Spaceship
|
|
217
217
|
return if ready_to_test?
|
218
218
|
return if approved?
|
219
219
|
|
220
|
-
|
221
|
-
build = resp.first
|
222
|
-
|
220
|
+
build = find_app_store_connect_build
|
223
221
|
Spaceship::ConnectAPI::Base.client.post_beta_app_review_submissions(build_id: build["id"])
|
224
222
|
end
|
225
223
|
|
@@ -230,6 +228,12 @@ module Spaceship
|
|
230
228
|
def add_group!(group)
|
231
229
|
client.add_group_to_build(app_id: app_id, group_id: group.id, build_id: id)
|
232
230
|
end
|
231
|
+
|
232
|
+
# Bridges the TestFlight::Build to the App Store Connect API build
|
233
|
+
def find_app_store_connect_build
|
234
|
+
resp = Spaceship::ConnectAPI::Base.client.get_builds(filter: { expired: false, processingState: "PROCESSING,VALID", version: self.build_version })
|
235
|
+
resp.first
|
236
|
+
end
|
233
237
|
end
|
234
238
|
end
|
235
239
|
end
|
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.118.0.beta.
|
4
|
+
version: 2.118.0.beta.20190315200105
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Dee
|
@@ -27,7 +27,7 @@ authors:
|
|
27
27
|
autorequire:
|
28
28
|
bindir: bin
|
29
29
|
cert_chain: []
|
30
|
-
date: 2019-03-
|
30
|
+
date: 2019-03-15 00:00:00.000000000 Z
|
31
31
|
dependencies:
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
33
|
name: slack-notifier
|
@@ -1687,24 +1687,24 @@ metadata:
|
|
1687
1687
|
post_install_message:
|
1688
1688
|
rdoc_options: []
|
1689
1689
|
require_paths:
|
1690
|
-
- pilot/lib
|
1691
|
-
- match/lib
|
1692
|
-
- fastlane_core/lib
|
1693
|
-
- gym/lib
|
1694
1690
|
- precheck/lib
|
1695
|
-
-
|
1696
|
-
-
|
1697
|
-
- sigh/lib
|
1698
|
-
- spaceship/lib
|
1699
|
-
- credentials_manager/lib
|
1691
|
+
- pem/lib
|
1692
|
+
- deliver/lib
|
1700
1693
|
- cert/lib
|
1694
|
+
- spaceship/lib
|
1701
1695
|
- scan/lib
|
1696
|
+
- frameit/lib
|
1702
1697
|
- snapshot/lib
|
1703
|
-
-
|
1698
|
+
- produce/lib
|
1699
|
+
- sigh/lib
|
1704
1700
|
- supply/lib
|
1705
|
-
-
|
1706
|
-
-
|
1701
|
+
- gym/lib
|
1702
|
+
- credentials_manager/lib
|
1703
|
+
- pilot/lib
|
1704
|
+
- screengrab/lib
|
1705
|
+
- match/lib
|
1707
1706
|
- fastlane/lib
|
1707
|
+
- fastlane_core/lib
|
1708
1708
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1709
1709
|
requirements:
|
1710
1710
|
- - ">="
|