fastlane 2.183.2 → 2.186.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +93 -86
- data/cert/lib/cert/runner.rb +3 -7
- data/deliver/lib/deliver/commands_generator.rb +1 -1
- data/deliver/lib/deliver/detect_values.rb +5 -3
- data/deliver/lib/deliver/download_screenshots.rb +1 -1
- data/deliver/lib/deliver/html_generator.rb +2 -2
- data/deliver/lib/deliver/module.rb +6 -0
- data/deliver/lib/deliver/options.rb +36 -51
- data/deliver/lib/deliver/runner.rb +8 -11
- data/deliver/lib/deliver/setup.rb +1 -1
- data/deliver/lib/deliver/submit_for_review.rb +1 -1
- data/deliver/lib/deliver/upload_metadata.rb +20 -6
- data/deliver/lib/deliver/upload_price_tier.rb +1 -1
- data/deliver/lib/deliver/upload_screenshots.rb +1 -1
- data/fastlane/lib/fastlane/actions/adb.rb +1 -4
- data/fastlane/lib/fastlane/actions/adb_devices.rb +0 -1
- data/fastlane/lib/fastlane/actions/add_git_tag.rb +4 -4
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +10 -15
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +12 -2
- data/fastlane/lib/fastlane/actions/appetize.rb +0 -7
- data/fastlane/lib/fastlane/actions/appetize_viewing_url_generator.rb +0 -11
- data/fastlane/lib/fastlane/actions/appium.rb +40 -65
- data/fastlane/lib/fastlane/actions/apteligent.rb +3 -2
- data/fastlane/lib/fastlane/actions/artifactory.rb +5 -6
- data/fastlane/lib/fastlane/actions/automatic_code_signing.rb +6 -11
- data/fastlane/lib/fastlane/actions/backup_xcarchive.rb +2 -2
- data/fastlane/lib/fastlane/actions/badge.rb +9 -13
- data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +1 -3
- data/fastlane/lib/fastlane/actions/bundle_install.rb +8 -10
- data/fastlane/lib/fastlane/actions/carthage.rb +2 -16
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +8 -17
- data/fastlane/lib/fastlane/actions/chatwork.rb +3 -2
- data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +5 -1
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +0 -1
- data/fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb +0 -1
- data/fastlane/lib/fastlane/actions/cloc.rb +9 -13
- data/fastlane/lib/fastlane/actions/cocoapods.rb +9 -15
- data/fastlane/lib/fastlane/actions/commit_github_file.rb +1 -3
- data/fastlane/lib/fastlane/actions/commit_version_bump.rb +6 -7
- data/fastlane/lib/fastlane/actions/copy_artifacts.rb +3 -4
- data/fastlane/lib/fastlane/actions/crashlytics.rb +7 -11
- data/fastlane/lib/fastlane/actions/create_app_on_managed_play_store.rb +70 -76
- data/fastlane/lib/fastlane/actions/create_keychain.rb +9 -10
- data/fastlane/lib/fastlane/actions/create_pull_request.rb +0 -9
- data/fastlane/lib/fastlane/actions/danger.rb +6 -11
- data/fastlane/lib/fastlane/actions/deploygate.rb +1 -2
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +35 -16
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +10 -4
- data/fastlane/lib/fastlane/actions/download_app_privacy_details_from_app_store.rb +1 -1
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +3 -4
- data/fastlane/lib/fastlane/actions/dsym_zip.rb +1 -1
- data/fastlane/lib/fastlane/actions/ensure_git_branch.rb +0 -1
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +3 -4
- data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +3 -5
- data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +1 -2
- data/fastlane/lib/fastlane/actions/environment_variable.rb +13 -21
- data/fastlane/lib/fastlane/actions/erb.rb +2 -5
- data/fastlane/lib/fastlane/actions/get_build_number_repository.rb +1 -1
- data/fastlane/lib/fastlane/actions/get_certificates.rb +5 -1
- data/fastlane/lib/fastlane/actions/get_ipa_info_plist_value.rb +0 -1
- data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +29 -34
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +5 -1
- data/fastlane/lib/fastlane/actions/get_push_certificate.rb +1 -1
- data/fastlane/lib/fastlane/actions/git_add.rb +5 -10
- data/fastlane/lib/fastlane/actions/git_commit.rb +2 -6
- data/fastlane/lib/fastlane/actions/git_remote_branch.rb +57 -0
- data/fastlane/lib/fastlane/actions/github_api.rb +2 -5
- data/fastlane/lib/fastlane/actions/gradle.rb +11 -19
- data/fastlane/lib/fastlane/actions/hg_commit_version_bump.rb +1 -1
- data/fastlane/lib/fastlane/actions/hg_push.rb +1 -1
- data/fastlane/lib/fastlane/actions/hipchat.rb +4 -5
- data/fastlane/lib/fastlane/actions/hockey.rb +5 -12
- data/fastlane/lib/fastlane/actions/ifttt.rb +3 -6
- data/fastlane/lib/fastlane/actions/import_from_git.rb +2 -4
- data/fastlane/lib/fastlane/actions/increment_build_number.rb +1 -2
- data/fastlane/lib/fastlane/actions/install_on_device.rb +3 -6
- data/fastlane/lib/fastlane/actions/installr.rb +22 -25
- data/fastlane/lib/fastlane/actions/ipa.rb +2 -2
- data/fastlane/lib/fastlane/actions/jazzy.rb +8 -14
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +5 -1
- data/fastlane/lib/fastlane/actions/register_device.rb +7 -10
- data/fastlane/lib/fastlane/actions/register_devices.rb +7 -10
- data/fastlane/lib/fastlane/actions/set_changelog.rb +7 -10
- data/fastlane/lib/fastlane/actions/swiftlint.rb +17 -15
- data/fastlane/lib/fastlane/actions/sync_code_signing.rb +6 -1
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +5 -1
- data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +2 -1
- data/fastlane/lib/fastlane/environment_printer.rb +1 -0
- data/fastlane/lib/fastlane/{actions/.git_commit.rb.swp → helper/.git_helper.rb.swp} +0 -0
- data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +4 -4
- data/fastlane/lib/fastlane/helper/git_helper.rb +24 -7
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -1
- data/fastlane/lib/fastlane/setup/setup_ios.rb +3 -3
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +9 -6
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +20 -20
- data/fastlane/swift/Fastlane.swift +4101 -3656
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/OptionalConfigValue.swift +2 -32
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +1 -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/formatting/Brewfile.lock.json +11 -11
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +26 -3
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +5 -0
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +18 -3
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +1 -1
- data/fastlane_core/lib/fastlane_core/helper.rb +12 -0
- data/fastlane_core/lib/fastlane_core/print_table.rb +5 -3
- data/fastlane_core/lib/fastlane_core/project.rb +7 -3
- data/match/lib/match/importer.rb +9 -10
- data/match/lib/match/migrate.rb +2 -3
- data/match/lib/match/nuke.rb +5 -10
- data/match/lib/match/options.rb +1 -0
- data/match/lib/match/runner.rb +2 -3
- data/match/lib/match/spaceship_ensure.rb +3 -0
- data/match/lib/match/storage/google_cloud_storage.rb +2 -2
- data/match/lib/match/storage/s3_storage.rb +2 -2
- data/pilot/lib/pilot/build_manager.rb +4 -1
- data/pilot/lib/pilot/manager.rb +7 -8
- data/pilot/lib/pilot/options.rb +10 -2
- data/precheck/lib/precheck/runner.rb +8 -7
- data/sigh/lib/assets/resign.sh +81 -61
- data/sigh/lib/sigh/download_all.rb +4 -8
- data/sigh/lib/sigh/runner.rb +4 -8
- data/snapshot/lib/assets/SnapshotHelper.swift +1 -1
- data/snapshot/lib/snapshot/test_command_generator.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/api_client.rb +30 -5
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +36 -4
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +10 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +2 -3
- data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +3 -1
- data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +3 -1
- data/spaceship/lib/spaceship/connect_api/models/build.rb +5 -1
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +13 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +4 -2
- data/spaceship/lib/spaceship/spaceauth_runner.rb +19 -6
- metadata +22 -20
@@ -23,38 +23,6 @@ public enum OptionalConfigValue<T> {
|
|
23
23
|
}
|
24
24
|
}
|
25
25
|
|
26
|
-
extension Optional: ExpressibleByIntegerLiteral where Wrapped: ExpressibleByIntegerLiteral {
|
27
|
-
public typealias IntegerLiteralType = Wrapped.IntegerLiteralType
|
28
|
-
|
29
|
-
public init(integerLiteral value: Wrapped.IntegerLiteralType) {
|
30
|
-
self = .some(.init(integerLiteral: value))
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
extension Optional: ExpressibleByUnicodeScalarLiteral where Wrapped: ExpressibleByUnicodeScalarLiteral {
|
35
|
-
public typealias UnicodeScalarLiteralType = Wrapped.UnicodeScalarLiteralType
|
36
|
-
|
37
|
-
public init(unicodeScalarLiteral value: Wrapped.UnicodeScalarLiteralType) {
|
38
|
-
self = .some(.init(unicodeScalarLiteral: value))
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
42
|
-
extension Optional: ExpressibleByExtendedGraphemeClusterLiteral where Wrapped: ExpressibleByStringLiteral {
|
43
|
-
public typealias ExtendedGraphemeClusterLiteralType = Wrapped.ExtendedGraphemeClusterLiteralType
|
44
|
-
|
45
|
-
public init(extendedGraphemeClusterLiteral value: Wrapped.ExtendedGraphemeClusterLiteralType) {
|
46
|
-
self = .some(.init(extendedGraphemeClusterLiteral: value))
|
47
|
-
}
|
48
|
-
}
|
49
|
-
|
50
|
-
extension Optional: ExpressibleByStringLiteral where Wrapped: ExpressibleByStringLiteral {
|
51
|
-
public typealias StringLiteralType = Wrapped.StringLiteralType
|
52
|
-
|
53
|
-
public init(stringLiteral value: Wrapped.StringLiteralType) {
|
54
|
-
self = .some(.init(stringLiteral: value))
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
26
|
extension OptionalConfigValue: ExpressibleByUnicodeScalarLiteral where T == String? {
|
59
27
|
public typealias UnicodeScalarLiteralType = String
|
60
28
|
|
@@ -79,6 +47,8 @@ extension OptionalConfigValue: ExpressibleByStringLiteral where T == String? {
|
|
79
47
|
}
|
80
48
|
}
|
81
49
|
|
50
|
+
extension OptionalConfigValue: ExpressibleByStringInterpolation where T == String? {}
|
51
|
+
|
82
52
|
extension OptionalConfigValue: ExpressibleByNilLiteral {
|
83
53
|
public init(nilLiteral _: ()) {
|
84
54
|
self = .nil
|
@@ -2,30 +2,30 @@
|
|
2
2
|
"entries": {
|
3
3
|
"brew": {
|
4
4
|
"swiftformat": {
|
5
|
-
"version": "0.48.
|
5
|
+
"version": "0.48.5",
|
6
6
|
"bottle": {
|
7
7
|
"rebuild": 0,
|
8
8
|
"root_url": "https://ghcr.io/v2/homebrew/core",
|
9
9
|
"files": {
|
10
10
|
"arm64_big_sur": {
|
11
11
|
"cellar": ":any_skip_relocation",
|
12
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
13
|
-
"sha256": "
|
12
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:7619ac8360774b9854b838912b43b8d7be9dfd39a2cf4bdd24afbc2007cd6bd8",
|
13
|
+
"sha256": "7619ac8360774b9854b838912b43b8d7be9dfd39a2cf4bdd24afbc2007cd6bd8"
|
14
14
|
},
|
15
15
|
"big_sur": {
|
16
16
|
"cellar": ":any_skip_relocation",
|
17
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
18
|
-
"sha256": "
|
17
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:c50e89c6fd21e817cdf5f1b1d0a51c25553e0d5bcb396fe18e6404f4ad31c2b8",
|
18
|
+
"sha256": "c50e89c6fd21e817cdf5f1b1d0a51c25553e0d5bcb396fe18e6404f4ad31c2b8"
|
19
19
|
},
|
20
20
|
"catalina": {
|
21
21
|
"cellar": ":any_skip_relocation",
|
22
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
23
|
-
"sha256": "
|
22
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:41d5ecd73bba3c90c8770d33dc86fb0a07f9fb23034d1b07517e7dd9431e8280",
|
23
|
+
"sha256": "41d5ecd73bba3c90c8770d33dc86fb0a07f9fb23034d1b07517e7dd9431e8280"
|
24
24
|
},
|
25
25
|
"mojave": {
|
26
26
|
"cellar": ":any_skip_relocation",
|
27
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
28
|
-
"sha256": "
|
27
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:369cb9a0eca80fc8fd0ae5a1dcf6dad9aea366d3325e196276b05b9abb392357",
|
28
|
+
"sha256": "369cb9a0eca80fc8fd0ae5a1dcf6dad9aea366d3325e196276b05b9abb392357"
|
29
29
|
}
|
30
30
|
}
|
31
31
|
}
|
@@ -35,9 +35,9 @@
|
|
35
35
|
"system": {
|
36
36
|
"macos": {
|
37
37
|
"catalina": {
|
38
|
-
"HOMEBREW_VERSION": "3.
|
38
|
+
"HOMEBREW_VERSION": "3.2.0-18-g4f33c2c",
|
39
39
|
"HOMEBREW_PREFIX": "/usr/local",
|
40
|
-
"Homebrew/homebrew-core": "
|
40
|
+
"Homebrew/homebrew-core": "b7aeea4e146fc17d70862def113e90ee3153d514",
|
41
41
|
"CLT": "11.0.0.33.12",
|
42
42
|
"Xcode": "12.4",
|
43
43
|
"macOS": "10.15.7"
|
@@ -11,7 +11,7 @@ module FastlaneCore
|
|
11
11
|
|
12
12
|
class << self
|
13
13
|
# @return The build we waited for. This method will always return a build
|
14
|
-
def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true, select_latest: false)
|
14
|
+
def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, timeout_duration: nil, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true, select_latest: false)
|
15
15
|
# Warn about train_version being removed in the future
|
16
16
|
if train_version
|
17
17
|
UI.deprecated(":train_version is no longer a used argument on FastlaneCore::BuildWatcher. Please use :app_version instead.")
|
@@ -26,6 +26,12 @@ module FastlaneCore
|
|
26
26
|
platform = Spaceship::ConnectAPI::Platform.map(platform) if platform
|
27
27
|
UI.message("Waiting for processing on... app_id: #{app_id}, app_version: #{app_version}, build_version: #{build_version}, platform: #{platform}")
|
28
28
|
|
29
|
+
build_watching_start_time = Time.new
|
30
|
+
unless timeout_duration.nil?
|
31
|
+
end_time = build_watching_start_time + timeout_duration
|
32
|
+
UI.message("Will timeout watching build after #{timeout_duration} seconds around #{end_time}...")
|
33
|
+
end
|
34
|
+
|
29
35
|
showed_info = false
|
30
36
|
loop do
|
31
37
|
matched_build, app_version_queried = matching_build(watched_app_version: app_version, watched_build_version: build_version, app_id: app_id, platform: platform, select_latest: select_latest)
|
@@ -56,6 +62,9 @@ module FastlaneCore
|
|
56
62
|
end
|
57
63
|
end
|
58
64
|
|
65
|
+
# Before next poll, force stop build watching, if we exceeded the 'timeout_duration' waiting time
|
66
|
+
force_stop_build_watching_if_required(start_time: build_watching_start_time, timeout_duration: timeout_duration)
|
67
|
+
|
59
68
|
sleep(poll_interval)
|
60
69
|
end
|
61
70
|
end
|
@@ -83,8 +92,8 @@ module FastlaneCore
|
|
83
92
|
|
84
93
|
if versions.empty?
|
85
94
|
if select_latest
|
86
|
-
|
87
|
-
UI.message(
|
95
|
+
message = watched_build_version.nil? ? "Searching for the latest build" : "Searching for the latest build with build number: #{watched_build_version}"
|
96
|
+
UI.message(message)
|
88
97
|
versions = [nil]
|
89
98
|
else
|
90
99
|
raise BuildWatcherError.new, "There is no app version to watch"
|
@@ -145,6 +154,20 @@ module FastlaneCore
|
|
145
154
|
UI.message("Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)")
|
146
155
|
end
|
147
156
|
end
|
157
|
+
|
158
|
+
def force_stop_build_watching_if_required(start_time: nil, timeout_duration: nil)
|
159
|
+
return if start_time.nil? || timeout_duration.nil? # keep watching build for App Store Connect processing
|
160
|
+
|
161
|
+
current_time = Time.new
|
162
|
+
end_time = start_time + timeout_duration
|
163
|
+
pending_duration = end_time - current_time
|
164
|
+
|
165
|
+
if current_time > end_time
|
166
|
+
UI.crash!("FastlaneCore::BuildWatcher exceeded the '#{timeout_duration.to_i}' seconds, Stopping now!")
|
167
|
+
else
|
168
|
+
UI.verbose("Will timeout watching build after pending #{pending_duration.to_i} seconds around #{end_time}...")
|
169
|
+
end
|
170
|
+
end
|
148
171
|
end
|
149
172
|
end
|
150
173
|
end
|
@@ -30,6 +30,11 @@ module FastlaneCore
|
|
30
30
|
type = option.is_string ? String : nil
|
31
31
|
end
|
32
32
|
|
33
|
+
# OptionParser doesn't like symbol but a symbol and string can be easily cast with `to_sym` and `to_s`
|
34
|
+
if type == Symbol
|
35
|
+
type = String
|
36
|
+
end
|
37
|
+
|
33
38
|
# Boolean is a fastlane thing, it's either TrueClass, or FalseClass, but we won't know
|
34
39
|
# that until runtime, so nil is the best we get
|
35
40
|
if type == Fastlane::Boolean
|
@@ -216,6 +216,17 @@ module FastlaneCore
|
|
216
216
|
end
|
217
217
|
end
|
218
218
|
|
219
|
+
def ensure_array_type_passes_validation(value)
|
220
|
+
if @skip_type_validation
|
221
|
+
return
|
222
|
+
end
|
223
|
+
|
224
|
+
# Arrays can be an either be an array or string that gets split by comma in auto_convert_type
|
225
|
+
if !value.kind_of?(Array) && !value.kind_of?(String)
|
226
|
+
UI.user_error!("'#{self.key}' value must be either `Array` or `comma-separated String`! Found #{value.class} instead.")
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
219
230
|
# Make sure, the value is valid (based on the verify block)
|
220
231
|
# Raises an exception if the value is invalid
|
221
232
|
def valid?(value)
|
@@ -225,6 +236,8 @@ module FastlaneCore
|
|
225
236
|
# Verify that value is the type that we're expecting, if we are expecting a type
|
226
237
|
if data_type == Fastlane::Boolean
|
227
238
|
ensure_boolean_type_passes_validation(value)
|
239
|
+
elsif data_type == Array
|
240
|
+
ensure_array_type_passes_validation(value)
|
228
241
|
else
|
229
242
|
ensure_generic_type_passes_validation(value)
|
230
243
|
end
|
@@ -262,6 +275,8 @@ module FastlaneCore
|
|
262
275
|
return value.to_i if value.to_i.to_s == value.to_s
|
263
276
|
elsif data_type == Float
|
264
277
|
return value.to_f if value.to_f.to_s == value.to_s
|
278
|
+
elsif data_type == Symbol
|
279
|
+
return value.to_sym if value.to_sym.to_s == value.to_s
|
265
280
|
elsif allow_shell_conversion
|
266
281
|
return value.shelljoin if value.kind_of?(Array)
|
267
282
|
return value.map { |k, v| "#{k.to_s.shellescape}=#{v.shellescape}" }.join(' ') if value.kind_of?(Hash)
|
@@ -272,11 +287,11 @@ module FastlaneCore
|
|
272
287
|
rescue JSON::ParserError
|
273
288
|
end
|
274
289
|
elsif data_type != String
|
275
|
-
# Special treatment if the user specified true, false or YES, NO
|
290
|
+
# Special treatment if the user specified true, false, on, off or YES, NO
|
276
291
|
# There is no boolean type, so we just do it here
|
277
|
-
if %w(YES
|
292
|
+
if %w(yes YES true TRUE on ON).include?(value)
|
278
293
|
return true
|
279
|
-
elsif %w(NO
|
294
|
+
elsif %w(no NO false FALSE off OFF).include?(value)
|
280
295
|
return false
|
281
296
|
end
|
282
297
|
end
|
@@ -212,7 +212,7 @@ module FastlaneCore
|
|
212
212
|
# if 'force_ask' is true, the option is not required to be optional to ask
|
213
213
|
# rubocop:disable Metrics/PerceivedComplexity
|
214
214
|
def fetch(key, ask: true, force_ask: false)
|
215
|
-
UI.crash!("Key '#{key}' must be a symbol. Example
|
215
|
+
UI.crash!("Key '#{key}' must be a symbol. Example :#{key}") unless key.kind_of?(Symbol)
|
216
216
|
|
217
217
|
option = verify_options_key!(key)
|
218
218
|
|
@@ -174,6 +174,18 @@ module FastlaneCore
|
|
174
174
|
Gem::Version.new(installed_xcode_version) >= Gem::Version.new(version)
|
175
175
|
end
|
176
176
|
|
177
|
+
# Swift
|
178
|
+
#
|
179
|
+
|
180
|
+
# @return Swift version
|
181
|
+
def self.swift_version
|
182
|
+
if system("which swift > /dev/null 2>&1")
|
183
|
+
output = `swift --version`
|
184
|
+
return output.split("\n").first.match(/version ([0-9.]+)/).captures.first
|
185
|
+
end
|
186
|
+
return nil
|
187
|
+
end
|
188
|
+
|
177
189
|
# iTMSTransporter
|
178
190
|
#
|
179
191
|
|
@@ -36,9 +36,11 @@ module FastlaneCore
|
|
36
36
|
|
37
37
|
params[:title] = title.green if title
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
unless FastlaneCore::Env.truthy?("FASTLANE_SKIP_ALL_LANE_SUMMARIES")
|
40
|
+
puts("")
|
41
|
+
puts(Terminal::Table.new(params))
|
42
|
+
puts("")
|
43
|
+
end
|
42
44
|
|
43
45
|
return params
|
44
46
|
end
|
@@ -123,9 +123,13 @@ module FastlaneCore
|
|
123
123
|
# Get all available schemes in an array
|
124
124
|
def schemes
|
125
125
|
@schemes ||= if workspace?
|
126
|
-
|
127
|
-
|
128
|
-
|
126
|
+
if FastlaneCore::Env.truthy?("FASTLANE_INCLUDE_PODS_PROJECT_SCHEMES")
|
127
|
+
workspace.schemes.keys
|
128
|
+
else
|
129
|
+
workspace.schemes.reject do |k, v|
|
130
|
+
v.include?("Pods/Pods.xcodeproj")
|
131
|
+
end.keys
|
132
|
+
end
|
129
133
|
else
|
130
134
|
Xcodeproj::Project.schemes(path)
|
131
135
|
end
|
data/match/lib/match/importer.rb
CHANGED
@@ -22,6 +22,9 @@ module Match
|
|
22
22
|
git_branch: params[:git_branch],
|
23
23
|
git_full_name: params[:git_full_name],
|
24
24
|
git_user_email: params[:git_user_email],
|
25
|
+
git_private_key: params[:git_private_key],
|
26
|
+
git_basic_authorization: params[:git_basic_authorization],
|
27
|
+
git_bearer_authorization: params[:git_bearer_authorization],
|
25
28
|
clone_branch_directly: params[:clone_branch_directly],
|
26
29
|
type: params[:type].to_s,
|
27
30
|
platform: params[:platform].to_s,
|
@@ -93,15 +96,17 @@ module Match
|
|
93
96
|
dest_cert_path = File.join(output_dir_certs, "#{cert_name}.cer")
|
94
97
|
dest_p12_path = File.join(output_dir_certs, "#{p12_name}.p12")
|
95
98
|
else
|
96
|
-
|
97
|
-
token = api_token(params)
|
98
|
-
if token
|
99
|
+
if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
|
99
100
|
UI.message("Creating authorization token for App Store Connect API")
|
100
|
-
Spaceship::ConnectAPI.token =
|
101
|
+
Spaceship::ConnectAPI.token = api_token
|
102
|
+
elsif !Spaceship::ConnectAPI.token.nil?
|
103
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
101
104
|
else
|
102
105
|
UI.message("Login to App Store Connect (#{params[:username]})")
|
103
106
|
Spaceship::ConnectAPI.login(params[:username], use_portal: true, use_tunes: false, portal_team_id: params[:team_id], team_name: params[:team_name])
|
104
107
|
end
|
108
|
+
|
109
|
+
# Need to get the cert id by comparing base64 encoded cert content with certificate content from the API responses
|
105
110
|
certs = Spaceship::ConnectAPI::Certificate.all(filter: { certificateType: certificate_type })
|
106
111
|
|
107
112
|
# Base64 encode contents to find match from API to find a cert ID
|
@@ -147,11 +152,5 @@ module Match
|
|
147
152
|
UI.user_error!("#{file_description} does not exist at path: #{file_path}") unless !file_path.nil? || optional
|
148
153
|
file_path
|
149
154
|
end
|
150
|
-
|
151
|
-
def api_token(params)
|
152
|
-
@api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
|
153
|
-
@api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
|
154
|
-
return @api_token
|
155
|
-
end
|
156
155
|
end
|
157
156
|
end
|
data/match/lib/match/migrate.rb
CHANGED
@@ -91,9 +91,8 @@ module Match
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def api_token(params)
|
94
|
-
|
95
|
-
|
96
|
-
return @api_token
|
94
|
+
api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path])
|
95
|
+
return api_token
|
97
96
|
end
|
98
97
|
|
99
98
|
def ensure_parameters_are_valid(params)
|
data/match/lib/match/nuke.rb
CHANGED
@@ -102,9 +102,11 @@ module Match
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def spaceship_login
|
105
|
-
if api_token
|
105
|
+
if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
|
106
106
|
UI.message("Creating authorization token for App Store Connect API")
|
107
107
|
Spaceship::ConnectAPI.token = api_token
|
108
|
+
elsif !Spaceship::ConnectAPI.token.nil?
|
109
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
108
110
|
else
|
109
111
|
Spaceship::ConnectAPI.login(params[:username], use_portal: true, use_tunes: false, portal_team_id: params[:team_id], team_name: params[:team_name])
|
110
112
|
end
|
@@ -120,12 +122,6 @@ module Match
|
|
120
122
|
end
|
121
123
|
end
|
122
124
|
|
123
|
-
def api_token
|
124
|
-
@api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
|
125
|
-
@api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
|
126
|
-
return @api_token
|
127
|
-
end
|
128
|
-
|
129
125
|
# Collect all the certs/profiles
|
130
126
|
def prepare_list
|
131
127
|
UI.message("Fetching certificates and profiles...")
|
@@ -251,9 +247,8 @@ module Match
|
|
251
247
|
UI.success("Successfully deleted certificate")
|
252
248
|
end
|
253
249
|
|
254
|
-
if self.files.count > 0
|
255
|
-
|
256
|
-
end
|
250
|
+
files_to_delete = delete_files! if self.files.count > 0
|
251
|
+
files_to_delete ||= []
|
257
252
|
|
258
253
|
self.encryption.encrypt_files if self.encryption
|
259
254
|
|