fastlane 2.175.0 → 2.180.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +95 -82
- data/cert/lib/cert/options.rb +1 -0
- data/cert/lib/cert/runner.rb +5 -1
- data/deliver/lib/deliver/app_screenshot.rb +6 -2
- data/deliver/lib/deliver/download_screenshots.rb +1 -2
- data/deliver/lib/deliver/options.rb +1 -0
- data/deliver/lib/deliver/runner.rb +12 -4
- data/deliver/lib/deliver/setup.rb +0 -1
- data/deliver/lib/deliver/upload_metadata.rb +5 -4
- data/deliver/lib/deliver/upload_screenshots.rb +10 -10
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +6 -1
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +8 -5
- data/fastlane/lib/fastlane/actions/appaloosa.rb +7 -2
- data/fastlane/lib/fastlane/actions/backup_file.rb +1 -1
- data/fastlane/lib/fastlane/actions/build_app.rb +4 -0
- data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +4 -0
- data/fastlane/lib/fastlane/actions/commit_github_file.rb +11 -1
- data/fastlane/lib/fastlane/actions/create_xcframework.rb +5 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -1
- data/fastlane/lib/fastlane/actions/get_github_release.rb +11 -1
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +4 -0
- data/fastlane/lib/fastlane/actions/get_version_number.rb +17 -10
- data/fastlane/lib/fastlane/actions/git_branch.rb +4 -10
- data/fastlane/lib/fastlane/actions/git_tag_exists.rb +4 -0
- data/fastlane/lib/fastlane/actions/github_api.rb +2 -1
- data/fastlane/lib/fastlane/actions/increment_build_number.rb +8 -1
- data/fastlane/lib/fastlane/actions/install_provisioning_profile.rb +4 -0
- data/fastlane/lib/fastlane/actions/jazzy.rb +10 -1
- data/fastlane/lib/fastlane/actions/jira.rb +61 -14
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +1 -0
- data/fastlane/lib/fastlane/actions/match_nuke.rb +59 -0
- data/fastlane/lib/fastlane/actions/notarize.rb +98 -51
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +0 -1
- data/fastlane/lib/fastlane/actions/register_device.rb +1 -1
- data/fastlane/lib/fastlane/actions/register_devices.rb +1 -1
- data/fastlane/lib/fastlane/actions/restore_file.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_changelog.rb +1 -1
- data/fastlane/lib/fastlane/actions/sourcedocs.rb +164 -0
- data/fastlane/lib/fastlane/actions/spaceship_logs.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_project_provisioning.rb +1 -2
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +4 -5
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +5 -1
- data/fastlane/lib/fastlane/erb_template_helper.rb +7 -1
- data/fastlane/lib/fastlane/fast_file.rb +9 -5
- data/fastlane/lib/fastlane/helper/git_helper.rb +11 -7
- data/fastlane/lib/fastlane/plugins/plugin_fetcher.rb +1 -2
- data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +1 -2
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -2
- data/fastlane/lib/fastlane/setup/setup.rb +23 -10
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +4 -0
- data/fastlane/lib/fastlane/swift_runner_upgrader.rb +2 -0
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +3 -3
- data/fastlane/swift/Fastlane.swift +574 -332
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/LaneFileProtocol.swift +9 -3
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +3 -3
- data/fastlane/swift/RubyCommand.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +13 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
- data/fastlane/swift/SocketClient.swift +2 -1
- data/fastlane/swift/SocketResponse.swift +4 -2
- data/fastlane/swift/formatting/Brewfile.lock.json +12 -12
- data/fastlane_core/lib/fastlane_core.rb +1 -0
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +5 -3
- data/fastlane_core/lib/fastlane_core/helper.rb +24 -1
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +3 -2
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +14 -8
- data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +3 -2
- data/fastlane_core/lib/fastlane_core/project.rb +3 -14
- data/{deliver/lib/deliver → fastlane_core/lib/fastlane_core}/queue_worker.rb +4 -4
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +12 -1
- data/fastlane_core/lib/fastlane_core/ui/interface.rb +1 -1
- data/gym/lib/gym/generators/.package_command_generator_xcode7.rb.swp +0 -0
- data/gym/lib/gym/generators/package_command_generator.rb +4 -0
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +13 -8
- data/gym/lib/gym/runner.rb +11 -4
- data/match/lib/match/change_password.rb +3 -3
- data/match/lib/match/encryption/interface.rb +1 -1
- data/match/lib/match/encryption/openssl.rb +2 -2
- data/match/lib/match/importer.rb +1 -1
- data/match/lib/match/migrate.rb +1 -1
- data/match/lib/match/module.rb +1 -0
- data/match/lib/match/nuke.rb +1 -1
- data/match/lib/match/runner.rb +1 -1
- data/match/lib/match/storage/google_cloud_storage.rb +1 -1
- data/match/lib/match/storage/s3_storage.rb +1 -1
- data/pilot/lib/pilot/build_manager.rb +25 -8
- data/pilot/lib/pilot/manager.rb +5 -1
- data/pilot/lib/pilot/options.rb +4 -3
- data/precheck/lib/precheck/options.rb +1 -0
- data/precheck/lib/precheck/runner.rb +6 -2
- data/scan/lib/scan/detect_values.rb +4 -1
- data/scan/lib/scan/options.rb +20 -5
- data/scan/lib/scan/runner.rb +79 -1
- data/scan/lib/scan/test_command_generator.rb +8 -8
- data/screengrab/lib/screengrab/android_environment.rb +6 -4
- data/screengrab/lib/screengrab/runner.rb +2 -3
- data/sigh/lib/sigh/download_all.rb +1 -1
- data/sigh/lib/sigh/options.rb +1 -0
- data/sigh/lib/sigh/runner.rb +5 -1
- data/snapshot/lib/assets/SnapshotHelper.swift +1 -1
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +2 -1
- data/spaceship/lib/spaceship/client.rb +18 -17
- data/spaceship/lib/spaceship/connect_api/api_client.rb +24 -6
- data/spaceship/lib/spaceship/connect_api/models/app.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/build.rb +5 -0
- data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +13 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +13 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +8 -2
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +15 -0
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +41 -28
- metadata +26 -21
@@ -17,20 +17,20 @@ public protocol LaneFileProtocol: class {
|
|
17
17
|
func recordLaneDescriptions()
|
18
18
|
func beforeAll(with lane: String)
|
19
19
|
func afterAll(with lane: String)
|
20
|
-
func onError(currentLane: String, errorInfo: String)
|
20
|
+
func onError(currentLane: String, errorInfo: String, errorClass: String?, errorMessage: String?)
|
21
21
|
}
|
22
22
|
|
23
23
|
public extension LaneFileProtocol {
|
24
24
|
var fastlaneVersion: String { return "" } // Defaults to "" because that means any is fine
|
25
25
|
func beforeAll(with _: String) {} // No-op by default
|
26
26
|
func afterAll(with _: String) {} // No-op by default
|
27
|
-
func onError(currentLane _: String, errorInfo _: String) {} // No-op by default
|
28
27
|
func recordLaneDescriptions() {} // No-op by default
|
29
28
|
}
|
30
29
|
|
31
30
|
@objcMembers
|
32
31
|
open class LaneFile: NSObject, LaneFileProtocol {
|
33
32
|
private(set) static var fastfileInstance: LaneFile?
|
33
|
+
private static var onErrorCalled = Set<String>()
|
34
34
|
|
35
35
|
private static func trimLaneFromName(laneName: String) -> String {
|
36
36
|
return String(laneName.prefix(laneName.count - 4))
|
@@ -40,6 +40,10 @@ open class LaneFile: NSObject, LaneFileProtocol {
|
|
40
40
|
return String(laneName.prefix(laneName.count - 12))
|
41
41
|
}
|
42
42
|
|
43
|
+
public func onError(currentLane: String, errorInfo _: String, errorClass _: String?, errorMessage _: String?) {
|
44
|
+
LaneFile.onErrorCalled.insert(currentLane)
|
45
|
+
}
|
46
|
+
|
43
47
|
private static var laneFunctionNames: [String] {
|
44
48
|
var lanes: [String] = []
|
45
49
|
var methodCount: UInt32 = 0
|
@@ -137,7 +141,9 @@ open class LaneFile: NSObject, LaneFileProtocol {
|
|
137
141
|
_ = fastfileInstance.perform(NSSelectorFromString(laneMethod), with: parameters)
|
138
142
|
|
139
143
|
// Call only on success.
|
140
|
-
|
144
|
+
if !LaneFile.onErrorCalled.contains(lane) {
|
145
|
+
fastfileInstance.afterAll(with: lane)
|
146
|
+
}
|
141
147
|
|
142
148
|
log(message: "Done running lane: \(lane) 🚀")
|
143
149
|
return true
|
@@ -12,7 +12,7 @@ public protocol PrecheckfileProtocol: class {
|
|
12
12
|
var appIdentifier: String { get }
|
13
13
|
|
14
14
|
/// Your Apple ID Username
|
15
|
-
var username: String { get }
|
15
|
+
var username: String? { get }
|
16
16
|
|
17
17
|
/// The ID of your App Store Connect team if you're in multiple teams
|
18
18
|
var teamId: String? { get }
|
@@ -40,7 +40,7 @@ public extension PrecheckfileProtocol {
|
|
40
40
|
var apiKeyPath: String? { return nil }
|
41
41
|
var apiKey: [String: Any]? { return nil }
|
42
42
|
var appIdentifier: String { return "" }
|
43
|
-
var username: String { return
|
43
|
+
var username: String? { return nil }
|
44
44
|
var teamId: String? { return nil }
|
45
45
|
var teamName: String? { return nil }
|
46
46
|
var platform: String { return "ios" }
|
@@ -52,4 +52,4 @@ public extension PrecheckfileProtocol {
|
|
52
52
|
|
53
53
|
// Please don't remove the lines below
|
54
54
|
// They are used to detect outdated files
|
55
|
-
// FastlaneRunnerAPIVersion [0.9.
|
55
|
+
// FastlaneRunnerAPIVersion [0.9.59]
|
@@ -51,7 +51,7 @@ struct RubyCommand: RubyCommandable {
|
|
51
51
|
if type == .stringClosure {
|
52
52
|
return "{\"name\" : \"\(name)\", \"value\" : \"ignored_for_closure\"\(typeJson)}"
|
53
53
|
} else if let array = someValue as? [String] {
|
54
|
-
return "{\"name\" : \"\(name)\", \"value\" : \
|
54
|
+
return "{\"name\" : \"\(name)\", \"value\" : \(array)\(typeJson)}"
|
55
55
|
} else if let hash = someValue as? [String: Any] {
|
56
56
|
let jsonData = try! JSONSerialization.data(withJSONObject: hash, options: [])
|
57
57
|
let jsonString = String(data: jsonData, encoding: .utf8)!
|
@@ -20,6 +20,9 @@ public protocol ScanfileProtocol: class {
|
|
20
20
|
/// Should skip auto detecting of devices if none were specified
|
21
21
|
var skipDetectDevices: Bool { get }
|
22
22
|
|
23
|
+
/// Should fail if devices not found
|
24
|
+
var ensureDevicesFound: Bool { get }
|
25
|
+
|
23
26
|
/// Enabling this option will automatically killall Simulator processes before the run
|
24
27
|
var forceQuitSimulator: Bool { get }
|
25
28
|
|
@@ -110,6 +113,9 @@ public protocol ScanfileProtocol: class {
|
|
110
113
|
/// Should zip the derived data build products and place in output path?
|
111
114
|
var shouldZipBuildProducts: Bool { get }
|
112
115
|
|
116
|
+
/// Should provide additional copy of .xctestrun file (settings.xctestrun) and place in output path?
|
117
|
+
var outputXctestrun: Bool { get }
|
118
|
+
|
113
119
|
/// Should an Xcode result bundle be generated in the output directory
|
114
120
|
var resultBundle: Bool { get }
|
115
121
|
|
@@ -203,6 +209,9 @@ public protocol ScanfileProtocol: class {
|
|
203
209
|
/// Lets xcodebuild use system's scm configuration
|
204
210
|
var useSystemScm: Bool { get }
|
205
211
|
|
212
|
+
/// The number of times a test can fail before scan should stop retrying
|
213
|
+
var numberOfRetries: Int { get }
|
214
|
+
|
206
215
|
/// Should this step stop the build if the tests fail? Set this to false if you're using trainer
|
207
216
|
var failBuild: Bool { get }
|
208
217
|
}
|
@@ -214,6 +223,7 @@ public extension ScanfileProtocol {
|
|
214
223
|
var device: String? { return nil }
|
215
224
|
var devices: [String]? { return nil }
|
216
225
|
var skipDetectDevices: Bool { return false }
|
226
|
+
var ensureDevicesFound: Bool { return false }
|
217
227
|
var forceQuitSimulator: Bool { return false }
|
218
228
|
var resetSimulator: Bool { return false }
|
219
229
|
var disableSlideToType: Bool { return true }
|
@@ -244,6 +254,7 @@ public extension ScanfileProtocol {
|
|
244
254
|
var xcprettyArgs: String? { return nil }
|
245
255
|
var derivedDataPath: String? { return nil }
|
246
256
|
var shouldZipBuildProducts: Bool { return false }
|
257
|
+
var outputXctestrun: Bool { return false }
|
247
258
|
var resultBundle: Bool { return false }
|
248
259
|
var useClangReportName: Bool { return false }
|
249
260
|
var concurrentWorkers: Int? { return nil }
|
@@ -275,9 +286,10 @@ public extension ScanfileProtocol {
|
|
275
286
|
var skipPackageDependenciesResolution: Bool { return false }
|
276
287
|
var disablePackageAutomaticUpdates: Bool { return false }
|
277
288
|
var useSystemScm: Bool { return false }
|
289
|
+
var numberOfRetries: Int { return 0 }
|
278
290
|
var failBuild: Bool { return true }
|
279
291
|
}
|
280
292
|
|
281
293
|
// Please don't remove the lines below
|
282
294
|
// They are used to detect outdated files
|
283
|
-
// FastlaneRunnerAPIVersion [0.9.
|
295
|
+
// FastlaneRunnerAPIVersion [0.9.71]
|
@@ -302,7 +302,8 @@ extension SocketClient: StreamDelegate {
|
|
302
302
|
self.closeSession(sendAbort: false)
|
303
303
|
}
|
304
304
|
|
305
|
-
case let .failure(failureInformation):
|
305
|
+
case let .failure(failureInformation, failureClass, failureMessage):
|
306
|
+
LaneFile.fastfileInstance?.onError(currentLane: ArgumentProcessor(args: CommandLine.arguments).currentLane, errorInfo: failureInformation.joined(), errorClass: failureClass, errorMessage: failureMessage)
|
306
307
|
socketDelegate?.commandExecuted(serverResponse: .serverError) {
|
307
308
|
$0.writeSemaphore.signal()
|
308
309
|
self.handleFailure(message: failureInformation)
|
@@ -13,7 +13,7 @@ import Foundation
|
|
13
13
|
struct SocketResponse {
|
14
14
|
enum ResponseType {
|
15
15
|
case parseFailure(failureInformation: [String])
|
16
|
-
case failure(failureInformation: [String])
|
16
|
+
case failure(failureInformation: [String], failureClass: String?, failureMessage: String?)
|
17
17
|
case readyForNext(returnedObject: String?, closureArgumentValue: String?)
|
18
18
|
case clientInitiatedCancel
|
19
19
|
|
@@ -40,7 +40,9 @@ struct SocketResponse {
|
|
40
40
|
return
|
41
41
|
}
|
42
42
|
|
43
|
-
|
43
|
+
let failureClass = statusDictionary["failure_class"] as? String
|
44
|
+
let failureMessage = statusDictionary["failure_message"] as? String
|
45
|
+
self = .failure(failureInformation: failureInformation, failureClass: failureClass, failureMessage: failureMessage)
|
44
46
|
return
|
45
47
|
}
|
46
48
|
self = .parseFailure(failureInformation: ["Message status: \(status) not a supported status"])
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"entries": {
|
3
3
|
"brew": {
|
4
4
|
"swiftformat": {
|
5
|
-
"version": "0.47.
|
5
|
+
"version": "0.47.13",
|
6
6
|
"bottle": {
|
7
7
|
"rebuild": 0,
|
8
8
|
"cellar": ":any_skip_relocation",
|
@@ -10,20 +10,20 @@
|
|
10
10
|
"root_url": "https://homebrew.bintray.com/bottles",
|
11
11
|
"files": {
|
12
12
|
"arm64_big_sur": {
|
13
|
-
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.
|
14
|
-
"sha256": "
|
13
|
+
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.13.arm64_big_sur.bottle.tar.gz",
|
14
|
+
"sha256": "fdcdb5e94b9c4d66a32d4515ba3d2db4057865f96aefab0e41fdeaf2879f4f89"
|
15
15
|
},
|
16
16
|
"big_sur": {
|
17
|
-
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.
|
18
|
-
"sha256": "
|
17
|
+
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.13.big_sur.bottle.tar.gz",
|
18
|
+
"sha256": "cbb7a9803926d8bfaacf5c1a7d4cd07d8fe2255b1885be3ae2ffd8414e4c5292"
|
19
19
|
},
|
20
20
|
"catalina": {
|
21
|
-
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.
|
22
|
-
"sha256": "
|
21
|
+
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.13.catalina.bottle.tar.gz",
|
22
|
+
"sha256": "3a13e9b1f4a63bc03601897944f71dd4e6942788531dc060322d20fc6b36d2fd"
|
23
23
|
},
|
24
24
|
"mojave": {
|
25
|
-
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.
|
26
|
-
"sha256": "
|
25
|
+
"url": "https://homebrew.bintray.com/bottles/swiftformat-0.47.13.mojave.bottle.tar.gz",
|
26
|
+
"sha256": "4e0691f12a5ef3b01eba9f41091b8f3457bc65151bfad057a45e8de9525074cd"
|
27
27
|
}
|
28
28
|
}
|
29
29
|
}
|
@@ -33,10 +33,10 @@
|
|
33
33
|
"system": {
|
34
34
|
"macos": {
|
35
35
|
"catalina": {
|
36
|
-
"HOMEBREW_VERSION": "3.0.
|
36
|
+
"HOMEBREW_VERSION": "3.0.11-37-g6d0275f",
|
37
37
|
"HOMEBREW_PREFIX": "/usr/local",
|
38
|
-
"Homebrew/homebrew-core": "
|
39
|
-
"CLT": "11.0.33.12",
|
38
|
+
"Homebrew/homebrew-core": "ef0489237f06f73c1148f10ea1001def194b6808",
|
39
|
+
"CLT": "11.0.0.33.12",
|
40
40
|
"Xcode": "12.2",
|
41
41
|
"macOS": "10.15.7"
|
42
42
|
},
|
@@ -35,6 +35,7 @@ require_relative 'fastlane_core/analytics/analytics_ingester_client'
|
|
35
35
|
require_relative 'fastlane_core/analytics/analytics_session'
|
36
36
|
require_relative 'fastlane_core/tag_version'
|
37
37
|
require_relative 'fastlane_core/fastlane_pty'
|
38
|
+
require_relative 'fastlane_core/queue_worker'
|
38
39
|
|
39
40
|
# Third Party code
|
40
41
|
require 'colored'
|
@@ -208,8 +208,10 @@ module FastlaneCore
|
|
208
208
|
#####################################################
|
209
209
|
|
210
210
|
# Returns the value for a certain key. fastlane_core tries to fetch the value from different sources
|
211
|
-
# if 'ask' is true and the value is not present, the user will be prompted to provide a value
|
212
|
-
|
211
|
+
# if 'ask' is true and the value is not present, the user will be prompted to provide a value if optional
|
212
|
+
# if 'force_ask' is true, the option is not required to be optional to ask
|
213
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
214
|
+
def fetch(key, ask: true, force_ask: false)
|
213
215
|
UI.crash!("Key '#{key}' must be a symbol. Example :app_id.") unless key.kind_of?(Symbol)
|
214
216
|
|
215
217
|
option = verify_options_key!(key)
|
@@ -227,7 +229,7 @@ module FastlaneCore
|
|
227
229
|
|
228
230
|
value = option.auto_convert_value(value)
|
229
231
|
value = nil if value.nil? && !option.string? # by default boolean flags are false
|
230
|
-
return value unless value.nil? && !option.optional && ask
|
232
|
+
return value unless value.nil? && (!option.optional || force_ask) && ask
|
231
233
|
|
232
234
|
# fallback to asking
|
233
235
|
if Helper.test? || !UI.interactive?
|
@@ -75,7 +75,7 @@ module FastlaneCore
|
|
75
75
|
|
76
76
|
# Check for Jenkins, Travis CI, ... environment variables
|
77
77
|
['JENKINS_HOME', 'JENKINS_URL', 'TRAVIS', 'CI', 'APPCENTER_BUILD_ID', 'TEAMCITY_VERSION', 'GO_PIPELINE_NAME', 'bamboo_buildKey', 'GITLAB_CI', 'XCS', 'TF_BUILD', 'GITHUB_ACTION', 'GITHUB_ACTIONS', 'BITRISE_IO', 'BUDDY'].each do |current|
|
78
|
-
return true if
|
78
|
+
return true if FastlaneCore::Env.truthy?(current)
|
79
79
|
end
|
80
80
|
return false
|
81
81
|
end
|
@@ -377,6 +377,8 @@ module FastlaneCore
|
|
377
377
|
|
378
378
|
# returns the path of the executable with the correct extension on Windows
|
379
379
|
def self.get_executable_path(cmd_path)
|
380
|
+
cmd_path = localize_file_path(cmd_path)
|
381
|
+
|
380
382
|
if self.windows?
|
381
383
|
# PATHEXT contains the list of file extensions that Windows considers executable, semicolon separated.
|
382
384
|
# e.g. ".COM;.EXE;.BAT;.CMD"
|
@@ -393,6 +395,12 @@ module FastlaneCore
|
|
393
395
|
return cmd_path
|
394
396
|
end
|
395
397
|
|
398
|
+
# returns the path with the platform-specific path separator (`/` on UNIX, `\` on Windows)
|
399
|
+
def self.localize_file_path(path)
|
400
|
+
# change `/` to `\` on Windows
|
401
|
+
return self.windows? ? path.gsub('/', '\\') : path
|
402
|
+
end
|
403
|
+
|
396
404
|
# checks if given file is a valid json file
|
397
405
|
# base taken from: http://stackoverflow.com/a/26235831/1945875
|
398
406
|
def self.json_file?(filename)
|
@@ -462,5 +470,20 @@ module FastlaneCore
|
|
462
470
|
UI.error("Your entries do not match. Please try again")
|
463
471
|
end
|
464
472
|
end
|
473
|
+
|
474
|
+
# URI.open added by `require 'open-uri'` is not available in Ruby 2.4. This helper lets you open a URI
|
475
|
+
# by choosing appropriate interface to do so depending on Ruby version. This helper is subject to be removed
|
476
|
+
# when fastlane drops Ruby 2.4 support.
|
477
|
+
def self.open_uri(*rest, &block)
|
478
|
+
require 'open-uri'
|
479
|
+
|
480
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.5')
|
481
|
+
dup = rest.dup
|
482
|
+
uri = dup.shift
|
483
|
+
URI.parse(uri).open(*dup, &block)
|
484
|
+
else
|
485
|
+
URI.open(*rest, &block)
|
486
|
+
end
|
487
|
+
end
|
465
488
|
end
|
466
489
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require "digest/md5"
|
2
|
+
require 'securerandom'
|
2
3
|
|
3
4
|
require_relative 'globals'
|
4
5
|
require_relative 'ui/ui'
|
@@ -12,7 +13,7 @@ module FastlaneCore
|
|
12
13
|
attr_accessor :package_path
|
13
14
|
|
14
15
|
def generate(app_id: nil, ipa_path: nil, package_path: nil, platform: nil)
|
15
|
-
self.package_path = File.join(package_path, "#{app_id}.itmsp")
|
16
|
+
self.package_path = File.join(package_path, "#{app_id}-#{SecureRandom.uuid}.itmsp")
|
16
17
|
FileUtils.rm_rf(self.package_path) if File.directory?(self.package_path)
|
17
18
|
FileUtils.mkdir_p(self.package_path)
|
18
19
|
|
@@ -32,7 +33,7 @@ module FastlaneCore
|
|
32
33
|
File.write(File.join(self.package_path, METADATA_FILE_NAME), xml)
|
33
34
|
UI.success("Wrote XML data to '#{self.package_path}'") if FastlaneCore::Globals.verbose?
|
34
35
|
|
35
|
-
return package_path
|
36
|
+
return self.package_path
|
36
37
|
end
|
37
38
|
|
38
39
|
def unique_ipa_path(ipa_path)
|
@@ -94,6 +94,10 @@ module FastlaneCore
|
|
94
94
|
return exit_status.zero?
|
95
95
|
end
|
96
96
|
|
97
|
+
def displayable_errors
|
98
|
+
@errors.map { |error| "[Transporter Error Output]: #{error}" }.join("\n").gsub!(/"/, "")
|
99
|
+
end
|
100
|
+
|
97
101
|
private
|
98
102
|
|
99
103
|
def parse_line(line, hide_output)
|
@@ -107,7 +111,6 @@ module FastlaneCore
|
|
107
111
|
|
108
112
|
elsif line =~ ERROR_REGEX
|
109
113
|
@errors << $1
|
110
|
-
UI.error("[Transporter Error Output]: #{$1}")
|
111
114
|
|
112
115
|
# Check if it's a login error
|
113
116
|
if $1.include?("Your Apple ID or password was entered incorrectly") ||
|
@@ -117,9 +120,6 @@ module FastlaneCore
|
|
117
120
|
CredentialsManager::AccountManager.new(user: @user).invalid_credentials
|
118
121
|
UI.error("Please run this tool again to apply the new password")
|
119
122
|
end
|
120
|
-
elsif $1.include?("Redundant Binary Upload. There already exists a binary upload with build")
|
121
|
-
UI.error($1)
|
122
|
-
UI.error("You have to change the build number of your app to upload your ipa file")
|
123
123
|
end
|
124
124
|
|
125
125
|
output_done = true
|
@@ -471,11 +471,13 @@ module FastlaneCore
|
|
471
471
|
# Uploads the modified package back to App Store Connect
|
472
472
|
# @param app_id [Integer] The unique App ID
|
473
473
|
# @param dir [String] the path in which the package file is located
|
474
|
+
# @param package_path [String] the path to the package file (used instead of app_id and dir)
|
474
475
|
# @return (Bool) True if everything worked fine
|
475
476
|
# @raise [Deliver::TransporterTransferError] when something went wrong
|
476
477
|
# when transferring
|
477
|
-
def upload(app_id, dir)
|
478
|
-
|
478
|
+
def upload(app_id = nil, dir = nil, package_path: nil)
|
479
|
+
raise "app_id and dir are required or package_path is required" if (app_id.nil? || dir.nil?) && package_path.nil?
|
480
|
+
actual_dir = package_path || File.join(dir, "#{app_id}.itmsp")
|
479
481
|
|
480
482
|
UI.message("Going to upload updated app to App Store Connect")
|
481
483
|
UI.success("This might take a few minutes. Please don't interrupt the script.")
|
@@ -490,7 +492,7 @@ module FastlaneCore
|
|
490
492
|
result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?)
|
491
493
|
rescue TransporterRequiresApplicationSpecificPasswordError => ex
|
492
494
|
handle_two_step_failure(ex)
|
493
|
-
return upload(app_id, dir)
|
495
|
+
return upload(app_id, dir, package_path: package_path)
|
494
496
|
end
|
495
497
|
|
496
498
|
if result
|
@@ -501,7 +503,11 @@ module FastlaneCore
|
|
501
503
|
handle_error(@password)
|
502
504
|
end
|
503
505
|
|
504
|
-
result
|
506
|
+
return result
|
507
|
+
end
|
508
|
+
|
509
|
+
def displayable_errors
|
510
|
+
@transporter_executor.displayable_errors
|
505
511
|
end
|
506
512
|
|
507
513
|
def provider_ids
|