fastlane 2.173.0 → 2.178.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 +82 -82
- data/cert/lib/cert/options.rb +2 -2
- data/cert/lib/cert/runner.rb +1 -1
- data/deliver/lib/deliver/app_screenshot.rb +6 -2
- data/deliver/lib/deliver/options.rb +2 -2
- data/deliver/lib/deliver/runner.rb +8 -4
- data/deliver/lib/deliver/upload_metadata.rb +3 -3
- data/deliver/lib/deliver/upload_screenshots.rb +12 -11
- data/fastlane/lib/fastlane/actions/adb.rb +1 -1
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +3 -3
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +6 -2
- data/fastlane/lib/fastlane/actions/appaloosa.rb +7 -2
- data/fastlane/lib/fastlane/actions/appetize.rb +13 -1
- data/fastlane/lib/fastlane/actions/backup_file.rb +1 -1
- data/fastlane/lib/fastlane/actions/build_and_upload_to_appetize.rb +10 -2
- data/fastlane/lib/fastlane/actions/carthage.rb +22 -0
- data/fastlane/lib/fastlane/actions/cocoapods.rb +15 -1
- 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/capture_android_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +8 -2
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +5 -15
- data/fastlane/lib/fastlane/actions/get_github_release.rb +11 -1
- data/fastlane/lib/fastlane/actions/git_commit.rb +1 -1
- 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/jazzy.rb +10 -1
- data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +2 -2
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +1 -2
- data/fastlane/lib/fastlane/actions/register_device.rb +3 -3
- data/fastlane/lib/fastlane/actions/register_devices.rb +3 -3
- data/fastlane/lib/fastlane/actions/restore_file.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_changelog.rb +3 -3
- data/fastlane/lib/fastlane/actions/swiftlint.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +1 -1
- 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/documentation/actions_list.rb +2 -2
- data/fastlane/lib/fastlane/erb_template_helper.rb +7 -1
- data/fastlane/lib/fastlane/fast_file.rb +9 -5
- data/fastlane/lib/fastlane/helper/adb_helper.rb +1 -1
- data/fastlane/lib/fastlane/helper/gem_helper.rb +2 -2
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +1 -1
- data/fastlane/swift/Appfile.swift +1 -1
- data/fastlane/swift/ArgumentProcessor.swift +1 -1
- data/fastlane/swift/ControlCommand.swift +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +1 -1
- data/fastlane/swift/Fastlane.swift +71 -27
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/LaneFileProtocol.swift +1 -1
- data/fastlane/swift/MainProcess.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/Plugins.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/RubyCommand.swift +1 -1
- data/fastlane/swift/RubyCommandable.swift +1 -1
- data/fastlane/swift/Runner.swift +2 -2
- data/fastlane/swift/RunnerArgument.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +9 -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 +1 -1
- data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
- data/fastlane/swift/SocketResponse.swift +1 -1
- data/fastlane/swift/formatting/Brewfile.lock.json +20 -14
- data/fastlane/swift/main.swift +1 -1
- data/fastlane_core/lib/fastlane_core.rb +1 -0
- data/fastlane_core/lib/fastlane_core/command_executor.rb +3 -9
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +1 -1
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +23 -0
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +9 -5
- data/fastlane_core/lib/fastlane_core/helper.rb +26 -5
- 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/keychain_importer.rb +1 -1
- data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +3 -2
- data/fastlane_core/lib/fastlane_core/project.rb +23 -20
- data/{deliver/lib/deliver → fastlane_core/lib/fastlane_core}/queue_worker.rb +2 -2
- data/fastlane_core/lib/fastlane_core/ui/interface.rb +1 -1
- data/fastlane_core/lib/fastlane_core/update_checker/update_checker.rb +2 -2
- data/gym/lib/gym/.runner.rb.swp +0 -0
- data/gym/lib/gym/generators/.package_command_generator_xcode7.rb.swp +0 -0
- data/match/lib/match/importer.rb +1 -1
- data/match/lib/match/migrate.rb +1 -1
- data/match/lib/match/nuke.rb +6 -1
- data/match/lib/match/options.rb +2 -2
- 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 +1 -1
- data/pilot/lib/pilot/options.rb +5 -5
- data/precheck/lib/precheck/options.rb +2 -2
- data/precheck/lib/precheck/runner.rb +2 -2
- data/scan/lib/scan/detect_values.rb +4 -1
- data/scan/lib/scan/options.rb +10 -0
- data/scan/lib/scan/runner.rb +27 -0
- data/screengrab/lib/screengrab/android_environment.rb +2 -2
- data/screengrab/lib/screengrab/runner.rb +1 -2
- data/sigh/lib/sigh/download_all.rb +1 -1
- data/sigh/lib/sigh/options.rb +2 -2
- data/sigh/lib/sigh/runner.rb +1 -1
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +2 -1
- data/spaceship/README.md +2 -2
- data/spaceship/lib/spaceship/client.rb +18 -17
- data/spaceship/lib/spaceship/connect_api/api_client.rb +40 -7
- 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_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/bundle_id.rb +24 -0
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +26 -4
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +13 -0
- data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +53 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +13 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +2 -2
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +15 -0
- data/spaceship/lib/spaceship/playground.rb +2 -2
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +42 -29
- metadata +38 -22
@@ -56,6 +56,10 @@ module Spaceship
|
|
56
56
|
def ready_for_beta_submission?
|
57
57
|
return external_build_state == ExternalState::READY_FOR_BETA_SUBMISSION
|
58
58
|
end
|
59
|
+
|
60
|
+
def missing_export_compliance?
|
61
|
+
return external_build_state == ExternalState::MISSING_EXPORT_COMPLIANCE
|
62
|
+
end
|
59
63
|
end
|
60
64
|
end
|
61
65
|
end
|
@@ -56,6 +56,30 @@ module Spaceship
|
|
56
56
|
client ||= Spaceship::ConnectAPI
|
57
57
|
return client.get_bundle_id(bundle_id_id: bundle_id_id, includes: includes).first
|
58
58
|
end
|
59
|
+
|
60
|
+
def self.create(client: nil, name: nil, platform: nil, identifier: nil, seed_id: nil)
|
61
|
+
client ||= Spaceship::ConnectAPI
|
62
|
+
resp = client.post_bundle_id(name: name, platform: platform, identifier: identifier, seed_id: seed_id)
|
63
|
+
return resp.to_models.first
|
64
|
+
end
|
65
|
+
|
66
|
+
#
|
67
|
+
# BundleIdsCapabilities
|
68
|
+
#
|
69
|
+
|
70
|
+
def get_capabilities(client: nil, includes: nil)
|
71
|
+
client ||= Spaceship::ConnectAPI
|
72
|
+
resp = client.get_bundle_id_capabilities(bundle_id_id: id, includes: includes)
|
73
|
+
return resp.to_models
|
74
|
+
end
|
75
|
+
|
76
|
+
def create_capability(capability_type, settings: [], client: nil)
|
77
|
+
raise "capability_type is required " if capability_type.nil?
|
78
|
+
|
79
|
+
client ||= Spaceship::ConnectAPI
|
80
|
+
resp = client.post_bundle_id_capability(bundle_id_id: id, capability_type: capability_type, settings: settings)
|
81
|
+
return resp.to_models.first
|
82
|
+
end
|
59
83
|
end
|
60
84
|
end
|
61
85
|
end
|
@@ -41,6 +41,21 @@ module Spaceship
|
|
41
41
|
MARZIPAN = "MARZIPAN" # Catalyst
|
42
42
|
end
|
43
43
|
|
44
|
+
module Settings
|
45
|
+
ICLOUD_VERSION = "ICLOUD_VERSION"
|
46
|
+
DATA_PROTECTION_PERMISSION_LEVEL = "DATA_PROTECTION_PERMISSION_LEVEL"
|
47
|
+
APPLE_ID_AUTH_APP_CONSENT = "APPLE_ID_AUTH_APP_CONSENT"
|
48
|
+
end
|
49
|
+
|
50
|
+
module Options
|
51
|
+
XCODE_5 = "XCODE_5"
|
52
|
+
XCODE_6 = "XCODE_6"
|
53
|
+
COMPLETE_PROTECTION = "COMPLETE_PROTECTION"
|
54
|
+
PROTECTED_UNLESS_OPEN = "PROTECTED_UNLESS_OPEN"
|
55
|
+
PROTECTED_UNTIL_FIRST_USER_AUTH = "PROTECTED_UNTIL_FIRST_USER_AUTH"
|
56
|
+
PRIMARY_APP_CONSENT = "PRIMARY_APP_CONSENT"
|
57
|
+
end
|
58
|
+
|
44
59
|
def self.type
|
45
60
|
return "bundleIdCapabilities"
|
46
61
|
end
|
@@ -59,14 +74,21 @@ module Spaceship
|
|
59
74
|
# API
|
60
75
|
#
|
61
76
|
|
62
|
-
def self.all(client: nil,
|
77
|
+
def self.all(client: nil, bundle_id_id:, limit: nil)
|
78
|
+
client ||= Spaceship::ConnectAPI
|
79
|
+
resp = client.get_bundle_id_capabilities(bundle_id_id: bundle_id_id, limit: limit).all_pages
|
80
|
+
return resp.flat_map(&:to_models)
|
81
|
+
end
|
82
|
+
|
83
|
+
def self.create(client: nil, bundle_id_id:, capability_type:, settings: [])
|
63
84
|
client ||= Spaceship::ConnectAPI
|
64
|
-
|
85
|
+
resp = client.post_bundle_id_capability(bundle_id_id: bundle_id_id, capability_type: capability_type, settings: settings)
|
86
|
+
return resp.to_models.first
|
65
87
|
end
|
66
88
|
|
67
|
-
def
|
89
|
+
def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
68
90
|
client ||= Spaceship::ConnectAPI
|
69
|
-
|
91
|
+
client.delete_bundle_id_capability(bundle_id_capability_id: id)
|
70
92
|
end
|
71
93
|
end
|
72
94
|
end
|
@@ -53,6 +53,19 @@ module Spaceship
|
|
53
53
|
return all(client: client, filter: { email: email }, includes: includes)
|
54
54
|
end
|
55
55
|
|
56
|
+
def self.create(client: nil, email: nil, first_name: nil, last_name: nil, roles: [], provisioning_allowed: nil, all_apps_visible: nil)
|
57
|
+
client ||= Spaceship::ConnectAPI
|
58
|
+
resp = client.post_user_invitation(
|
59
|
+
email: email,
|
60
|
+
first_name: first_name,
|
61
|
+
last_name: last_name,
|
62
|
+
roles: roles,
|
63
|
+
provisioning_allowed: provisioning_allowed,
|
64
|
+
all_apps_visible: all_apps_visible
|
65
|
+
)
|
66
|
+
return resp.to_models.first
|
67
|
+
end
|
68
|
+
|
56
69
|
def delete!(client: nil)
|
57
70
|
client ||= Spaceship::ConnectAPI
|
58
71
|
client.delete_user_invitation(user_invitation_id: id)
|
@@ -27,6 +27,59 @@ module Spaceship
|
|
27
27
|
provisioning_request_client.get("bundleIds/#{bundle_id_id}", params)
|
28
28
|
end
|
29
29
|
|
30
|
+
def post_bundle_id(name:, platform:, identifier:, seed_id:)
|
31
|
+
attributes = {
|
32
|
+
name: name,
|
33
|
+
platform: platform,
|
34
|
+
identifier: identifier,
|
35
|
+
seedId: seed_id
|
36
|
+
}
|
37
|
+
|
38
|
+
body = {
|
39
|
+
data: {
|
40
|
+
attributes: attributes,
|
41
|
+
type: "bundleIds"
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
provisioning_request_client.post("bundleIds", body)
|
46
|
+
end
|
47
|
+
|
48
|
+
#
|
49
|
+
# bundleIdCapability
|
50
|
+
#
|
51
|
+
|
52
|
+
def get_bundle_id_capabilities(bundle_id_id:, includes: nil, limit: nil, sort: nil)
|
53
|
+
params = provisioning_request_client.build_params(filter: nil, includes: includes, limit: limit, sort: sort)
|
54
|
+
provisioning_request_client.get("bundleIds/#{bundle_id_id}/bundleIdCapabilities", params)
|
55
|
+
end
|
56
|
+
|
57
|
+
def post_bundle_id_capability(bundle_id_id:, capability_type:, settings: [])
|
58
|
+
body = {
|
59
|
+
data: {
|
60
|
+
attributes: {
|
61
|
+
capabilityType: capability_type,
|
62
|
+
settings: settings
|
63
|
+
},
|
64
|
+
type: "bundleIdCapabilities",
|
65
|
+
relationships: {
|
66
|
+
bundleId: {
|
67
|
+
data: {
|
68
|
+
type: "bundleIds",
|
69
|
+
id: bundle_id_id
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
provisioning_request_client.post("bundleIdCapabilities", body)
|
77
|
+
end
|
78
|
+
|
79
|
+
def delete_bundle_id_capability(bundle_id_capability_id:)
|
80
|
+
provisioning_request_client.delete("bundleIdCapabilities/#{bundle_id_capability_id}")
|
81
|
+
end
|
82
|
+
|
30
83
|
#
|
31
84
|
# certificates
|
32
85
|
#
|
@@ -275,6 +275,19 @@ module Spaceship
|
|
275
275
|
test_flight_request_client.post("bulkBetaTesterAssignments", body)
|
276
276
|
end
|
277
277
|
|
278
|
+
def add_beta_tester_to_group(beta_group_id: nil, beta_tester_ids: nil)
|
279
|
+
beta_tester_ids || []
|
280
|
+
body = {
|
281
|
+
data: beta_tester_ids.map do |id|
|
282
|
+
{
|
283
|
+
type: "betaTesters",
|
284
|
+
id: id
|
285
|
+
}
|
286
|
+
end
|
287
|
+
}
|
288
|
+
test_flight_request_client.post("betaGroups/#{beta_group_id}/relationships/betaTesters", body)
|
289
|
+
end
|
290
|
+
|
278
291
|
def delete_beta_tester_from_apps(beta_tester_id: nil, app_ids: [])
|
279
292
|
body = {
|
280
293
|
data: app_ids.map do |id|
|
@@ -37,10 +37,10 @@ module Spaceship
|
|
37
37
|
raise "App Store Connect API key JSON is missing field(s): #{missing_keys.join(', ')}"
|
38
38
|
end
|
39
39
|
|
40
|
-
self.create(json)
|
40
|
+
self.create(**json)
|
41
41
|
end
|
42
42
|
|
43
|
-
def self.create(key_id: nil, issuer_id: nil, filepath: nil, key: nil, is_key_content_base64: false, duration: nil, in_house: nil)
|
43
|
+
def self.create(key_id: nil, issuer_id: nil, filepath: nil, key: nil, is_key_content_base64: false, duration: nil, in_house: nil, **)
|
44
44
|
key_id ||= ENV['SPACESHIP_CONNECT_API_KEY_ID']
|
45
45
|
issuer_id ||= ENV['SPACESHIP_CONNECT_API_ISSUER_ID']
|
46
46
|
filepath ||= ENV['SPACESHIP_CONNECT_API_KEY_FILEPATH']
|
@@ -381,6 +381,11 @@ module Spaceship
|
|
381
381
|
tunes_request_client.post("appPreviewSets", body)
|
382
382
|
end
|
383
383
|
|
384
|
+
def delete_app_preview_set(app_preview_set_id: nil)
|
385
|
+
params = tunes_request_client.build_params(filter: nil, includes: nil, limit: nil, sort: nil)
|
386
|
+
tunes_request_client.delete("appPreviewSets/#{app_preview_set_id}", params)
|
387
|
+
end
|
388
|
+
|
384
389
|
def patch_app_preview_set_previews(app_preview_set_id: nil, app_preview_ids: nil)
|
385
390
|
app_preview_ids ||= []
|
386
391
|
|
@@ -515,6 +520,11 @@ module Spaceship
|
|
515
520
|
tunes_request_client.patch("appScreenshotSets/#{app_screenshot_set_id}/relationships/appScreenshots", body)
|
516
521
|
end
|
517
522
|
|
523
|
+
def delete_app_screenshot_set(app_screenshot_set_id: nil)
|
524
|
+
params = tunes_request_client.build_params(filter: nil, includes: nil, limit: nil, sort: nil)
|
525
|
+
tunes_request_client.delete("appScreenshotSets/#{app_screenshot_set_id}", params)
|
526
|
+
end
|
527
|
+
|
518
528
|
#
|
519
529
|
# appScreenshots
|
520
530
|
#
|
@@ -757,6 +767,11 @@ module Spaceship
|
|
757
767
|
tunes_request_client.get("appStoreVersions/#{app_store_version_id}/appStoreVersionLocalizations", params)
|
758
768
|
end
|
759
769
|
|
770
|
+
def get_app_store_version_localization(app_store_version_localization_id: nil, filter: {}, includes: nil, limit: nil, sort: nil)
|
771
|
+
params = tunes_request_client.build_params(filter: nil, includes: nil, limit: nil, sort: nil)
|
772
|
+
tunes_request_client.get("appStoreVersionLocalizations/#{app_store_version_localization_id}", params)
|
773
|
+
end
|
774
|
+
|
760
775
|
def post_app_store_version_localization(app_store_version_id: nil, attributes: {})
|
761
776
|
body = {
|
762
777
|
data: {
|
@@ -13,8 +13,8 @@ module Spaceship
|
|
13
13
|
rescue Gem::LoadError
|
14
14
|
puts("Could not find gem 'pry'".red)
|
15
15
|
puts("")
|
16
|
-
puts("If you installed spaceship using `
|
17
|
-
puts("
|
16
|
+
puts("If you installed spaceship using `gem install spaceship` run")
|
17
|
+
puts(" gem install pry".yellow)
|
18
18
|
puts("to install the missing gem")
|
19
19
|
puts("")
|
20
20
|
puts("If you use a Gemfile add this to your Gemfile:")
|
@@ -579,10 +579,10 @@ module Spaceship
|
|
579
579
|
}
|
580
580
|
|
581
581
|
r = request(:post) do |req|
|
582
|
-
req.url("https://
|
582
|
+
req.url("https://appstoreconnect.apple.com/analytics/api/v1/data/time-series")
|
583
583
|
req.body = data.to_json
|
584
584
|
req.headers['Content-Type'] = 'application/json'
|
585
|
-
req.headers['X-Requested-By'] = '
|
585
|
+
req.headers['X-Requested-By'] = 'appstoreconnect.apple.com'
|
586
586
|
end
|
587
587
|
|
588
588
|
data = parse_response(r)
|
@@ -4,7 +4,7 @@ require_relative 'tunes/tunes_client'
|
|
4
4
|
module Spaceship
|
5
5
|
class Client
|
6
6
|
def handle_two_step_or_factor(response)
|
7
|
-
raise "2FA can only be performed in interactive mode" if ENV["FASTLANE_IS_INTERACTIVE"] == "false"
|
7
|
+
raise "2FA can only be performed in interactive mode" if ENV["SPACESHIP_ONLY_ALLOW_INTERACTIVE_2FA"] == "true" && ENV["FASTLANE_IS_INTERACTIVE"] == "false"
|
8
8
|
# extract `x-apple-id-session-id` and `scnt` from response, to be used by `update_request_headers`
|
9
9
|
@x_apple_id_session_id = response["x-apple-id-session-id"]
|
10
10
|
@scnt = response["scnt"]
|
@@ -135,7 +135,7 @@ module Spaceship
|
|
135
135
|
|
136
136
|
phone_number = env_2fa_sms_default_phone_number
|
137
137
|
phone_id = phone_id_from_number(response.body["trustedPhoneNumbers"], phone_number)
|
138
|
-
push_mode =
|
138
|
+
push_mode = push_mode_from_number(response.body["trustedPhoneNumbers"], phone_number)
|
139
139
|
# don't request sms if no trusted devices and env default is the only trusted number,
|
140
140
|
# code was automatically sent
|
141
141
|
should_request_code = !sms_automatically_sent(response)
|
@@ -234,34 +234,8 @@ module Spaceship
|
|
234
234
|
end
|
235
235
|
|
236
236
|
def phone_id_from_number(phone_numbers, phone_number)
|
237
|
-
characters_to_remove_from_phone_numbers = ' \-()"'
|
238
|
-
|
239
|
-
# start with e.g. +49 162 1234585 or +1-123-456-7866
|
240
|
-
phone_number = phone_number.tr(characters_to_remove_from_phone_numbers, '')
|
241
|
-
# cleaned: +491621234585 or +11234567866
|
242
|
-
|
243
237
|
phone_numbers.each do |phone|
|
244
|
-
|
245
|
-
# start with: +49 •••• •••••85 or +1 (•••) •••-••66
|
246
|
-
number_with_dialcode_masked = phone['numberWithDialCode'].tr(characters_to_remove_from_phone_numbers, '')
|
247
|
-
# cleaned: +49•••••••••85 or +1••••••••66
|
248
|
-
# rubocop:enable Style/AsciiComments
|
249
|
-
|
250
|
-
maskings_count = number_with_dialcode_masked.count('•') # => 9 or 8
|
251
|
-
pattern = /^([0-9+]{2,4})([•]{#{maskings_count}})([0-9]{2})$/
|
252
|
-
# following regex: range from maskings_count-2 because sometimes the masked number has 1 or 2 dots more than the actual number
|
253
|
-
# e.g. https://github.com/fastlane/fastlane/issues/14969
|
254
|
-
replacement = "\\1([0-9]{#{maskings_count - 2},#{maskings_count}})\\3"
|
255
|
-
number_with_dialcode_regex_part = number_with_dialcode_masked.gsub(pattern, replacement)
|
256
|
-
# => +49([0-9]{8,9})85 or +1([0-9]{7,8})66
|
257
|
-
|
258
|
-
backslash = '\\'
|
259
|
-
number_with_dialcode_regex_part = backslash + number_with_dialcode_regex_part
|
260
|
-
number_with_dialcode_regex = /^#{number_with_dialcode_regex_part}$/
|
261
|
-
# => /^\+49([0-9]{8})85$/ or /^\+1([0-9]{7,8})66$/
|
262
|
-
|
263
|
-
return phone['id'] if phone_number =~ number_with_dialcode_regex
|
264
|
-
# +491621234585 matches /^\+49([0-9]{8})85$/
|
238
|
+
return phone['id'] if match_phone_to_masked_phone(phone_number, phone['numberWithDialCode'])
|
265
239
|
end
|
266
240
|
|
267
241
|
# Handle case of phone_number not existing in phone_numbers because ENV var is wrong or matcher is broken
|
@@ -272,6 +246,45 @@ If it is, please open an issue at https://github.com/fastlane/fastlane/issues/ne
|
|
272
246
|
)
|
273
247
|
end
|
274
248
|
|
249
|
+
def push_mode_from_number(phone_numbers, phone_number)
|
250
|
+
phone_numbers.each do |phone|
|
251
|
+
return phone['pushMode'] if match_phone_to_masked_phone(phone_number, phone['numberWithDialCode'])
|
252
|
+
end
|
253
|
+
|
254
|
+
# If no pushMode was supplied, assume sms
|
255
|
+
return "sms"
|
256
|
+
end
|
257
|
+
|
258
|
+
def match_phone_to_masked_phone(phone_number, masked_number)
|
259
|
+
characters_to_remove_from_phone_numbers = ' \-()"'
|
260
|
+
|
261
|
+
# start with e.g. +49 162 1234585 or +1-123-456-7866
|
262
|
+
phone_number = phone_number.tr(characters_to_remove_from_phone_numbers, '')
|
263
|
+
# cleaned: +491621234585 or +11234567866
|
264
|
+
|
265
|
+
# rubocop:disable Style/AsciiComments
|
266
|
+
# start with: +49 •••• •••••85 or +1 (•••) •••-••66
|
267
|
+
number_with_dialcode_masked = masked_number.tr(characters_to_remove_from_phone_numbers, '')
|
268
|
+
# cleaned: +49•••••••••85 or +1••••••••66
|
269
|
+
# rubocop:enable Style/AsciiComments
|
270
|
+
|
271
|
+
maskings_count = number_with_dialcode_masked.count('•') # => 9 or 8
|
272
|
+
pattern = /^([0-9+]{2,4})([•]{#{maskings_count}})([0-9]{2})$/
|
273
|
+
# following regex: range from maskings_count-2 because sometimes the masked number has 1 or 2 dots more than the actual number
|
274
|
+
# e.g. https://github.com/fastlane/fastlane/issues/14969
|
275
|
+
replacement = "\\1([0-9]{#{maskings_count - 2},#{maskings_count}})\\3"
|
276
|
+
number_with_dialcode_regex_part = number_with_dialcode_masked.gsub(pattern, replacement)
|
277
|
+
# => +49([0-9]{8,9})85 or +1([0-9]{7,8})66
|
278
|
+
|
279
|
+
backslash = '\\'
|
280
|
+
number_with_dialcode_regex_part = backslash + number_with_dialcode_regex_part
|
281
|
+
number_with_dialcode_regex = /^#{number_with_dialcode_regex_part}$/
|
282
|
+
# => /^\+49([0-9]{8})85$/ or /^\+1([0-9]{7,8})66$/
|
283
|
+
|
284
|
+
return phone_number =~ number_with_dialcode_regex
|
285
|
+
# +491621234585 matches /^\+49([0-9]{8})85$/
|
286
|
+
end
|
287
|
+
|
275
288
|
def phone_id_from_masked_number(phone_numbers, masked_number)
|
276
289
|
phone_numbers.each do |phone|
|
277
290
|
return phone['id'] if phone['numberWithDialCode'] == masked_number
|
metadata
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.178.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
- Matthew Ellis
|
9
|
-
- Jan Piotrowski
|
10
|
-
- Maksym Grebenets
|
11
|
-
- Fumiya Nakamura
|
7
|
+
- Joshua Liebowitz
|
12
8
|
- Jorge Revuelta H
|
13
|
-
-
|
14
|
-
-
|
9
|
+
- Iulian Onofrei
|
10
|
+
- Kohki Miki
|
11
|
+
- Fumiya Nakamura
|
15
12
|
- Manu Wallner
|
16
|
-
-
|
13
|
+
- Stefan Natchev
|
14
|
+
- Olivier Halligon
|
17
15
|
- Daniel Jankowski
|
18
16
|
- Helmut Januschka
|
19
|
-
-
|
20
|
-
-
|
21
|
-
- Stefan Natchev
|
17
|
+
- Jan Piotrowski
|
18
|
+
- Felix Krause
|
22
19
|
- Jimmy Dee
|
23
|
-
-
|
20
|
+
- Maksym Grebenets
|
24
21
|
- Andrew McBurney
|
25
|
-
-
|
26
|
-
-
|
27
|
-
-
|
22
|
+
- Max Ott
|
23
|
+
- Matthew Ellis
|
24
|
+
- Aaron Brager
|
25
|
+
- Jérôme Lacoste
|
26
|
+
- Luka Mirosevic
|
28
27
|
- Danielle Tomlinson
|
28
|
+
- Josh Holtz
|
29
29
|
autorequire:
|
30
30
|
bindir: bin
|
31
31
|
cert_chain: []
|
32
|
-
date: 2021-
|
32
|
+
date: 2021-03-12 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: slack-notifier
|
@@ -477,6 +477,20 @@ dependencies:
|
|
477
477
|
- - "<"
|
478
478
|
- !ruby/object:Gem::Version
|
479
479
|
version: 5.0.0
|
480
|
+
- !ruby/object:Gem::Dependency
|
481
|
+
name: naturally
|
482
|
+
requirement: !ruby/object:Gem::Requirement
|
483
|
+
requirements:
|
484
|
+
- - "~>"
|
485
|
+
- !ruby/object:Gem::Version
|
486
|
+
version: '2.2'
|
487
|
+
type: :runtime
|
488
|
+
prerelease: false
|
489
|
+
version_requirements: !ruby/object:Gem::Requirement
|
490
|
+
requirements:
|
491
|
+
- - "~>"
|
492
|
+
- !ruby/object:Gem::Version
|
493
|
+
version: '2.2'
|
480
494
|
- !ruby/object:Gem::Dependency
|
481
495
|
name: rubyzip
|
482
496
|
requirement: !ruby/object:Gem::Requirement
|
@@ -693,14 +707,14 @@ dependencies:
|
|
693
707
|
requirements:
|
694
708
|
- - "~>"
|
695
709
|
- !ruby/object:Gem::Version
|
696
|
-
version: 3.10
|
710
|
+
version: '3.10'
|
697
711
|
type: :development
|
698
712
|
prerelease: false
|
699
713
|
version_requirements: !ruby/object:Gem::Requirement
|
700
714
|
requirements:
|
701
715
|
- - "~>"
|
702
716
|
- !ruby/object:Gem::Version
|
703
|
-
version: 3.10
|
717
|
+
version: '3.10'
|
704
718
|
- !ruby/object:Gem::Dependency
|
705
719
|
name: rspec_junit_formatter
|
706
720
|
requirement: !ruby/object:Gem::Requirement
|
@@ -875,14 +889,14 @@ dependencies:
|
|
875
889
|
requirements:
|
876
890
|
- - "~>"
|
877
891
|
- !ruby/object:Gem::Version
|
878
|
-
version: 1.2
|
892
|
+
version: '1.2'
|
879
893
|
type: :development
|
880
894
|
prerelease: false
|
881
895
|
version_requirements: !ruby/object:Gem::Requirement
|
882
896
|
requirements:
|
883
897
|
- - "~>"
|
884
898
|
- !ruby/object:Gem::Version
|
885
|
-
version: 1.2
|
899
|
+
version: '1.2'
|
886
900
|
- !ruby/object:Gem::Dependency
|
887
901
|
name: sinatra
|
888
902
|
requirement: !ruby/object:Gem::Requirement
|
@@ -969,7 +983,6 @@ files:
|
|
969
983
|
- deliver/lib/deliver/loader.rb
|
970
984
|
- deliver/lib/deliver/module.rb
|
971
985
|
- deliver/lib/deliver/options.rb
|
972
|
-
- deliver/lib/deliver/queue_worker.rb
|
973
986
|
- deliver/lib/deliver/runner.rb
|
974
987
|
- deliver/lib/deliver/setup.rb
|
975
988
|
- deliver/lib/deliver/submit_for_review.rb
|
@@ -1409,6 +1422,7 @@ files:
|
|
1409
1422
|
- fastlane_core/lib/fastlane_core/print_table.rb
|
1410
1423
|
- fastlane_core/lib/fastlane_core/project.rb
|
1411
1424
|
- fastlane_core/lib/fastlane_core/provisioning_profile.rb
|
1425
|
+
- fastlane_core/lib/fastlane_core/queue_worker.rb
|
1412
1426
|
- fastlane_core/lib/fastlane_core/string_filters.rb
|
1413
1427
|
- fastlane_core/lib/fastlane_core/swag.rb
|
1414
1428
|
- fastlane_core/lib/fastlane_core/tag_version.rb
|
@@ -1451,10 +1465,12 @@ files:
|
|
1451
1465
|
- gym/lib/assets/GymfileTemplate.swift
|
1452
1466
|
- gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh
|
1453
1467
|
- gym/lib/gym.rb
|
1468
|
+
- gym/lib/gym/.runner.rb.swp
|
1454
1469
|
- gym/lib/gym/code_signing_mapping.rb
|
1455
1470
|
- gym/lib/gym/commands_generator.rb
|
1456
1471
|
- gym/lib/gym/detect_values.rb
|
1457
1472
|
- gym/lib/gym/error_handler.rb
|
1473
|
+
- gym/lib/gym/generators/.package_command_generator_xcode7.rb.swp
|
1458
1474
|
- gym/lib/gym/generators/README.md
|
1459
1475
|
- gym/lib/gym/generators/build_command_generator.rb
|
1460
1476
|
- gym/lib/gym/generators/package_command_generator.rb
|