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
@@ -53,18 +53,15 @@ module Fastlane
|
|
53
53
|
FastlaneCore::ConfigItem.new(key: :value1,
|
54
54
|
env_name: "IFTTT_VALUE1",
|
55
55
|
description: "Extra data sent with the event",
|
56
|
-
optional: true,
|
57
|
-
is_string: true),
|
56
|
+
optional: true),
|
58
57
|
FastlaneCore::ConfigItem.new(key: :value2,
|
59
58
|
env_name: "IFTTT_VALUE2",
|
60
59
|
description: "Extra data sent with the event",
|
61
|
-
optional: true,
|
62
|
-
is_string: true),
|
60
|
+
optional: true),
|
63
61
|
FastlaneCore::ConfigItem.new(key: :value3,
|
64
62
|
env_name: "IFTTT_VALUE3",
|
65
63
|
description: "Extra data sent with the event",
|
66
|
-
optional: true
|
67
|
-
is_string: true)
|
64
|
+
optional: true)
|
68
65
|
]
|
69
66
|
end
|
70
67
|
|
@@ -24,7 +24,7 @@ module Fastlane
|
|
24
24
|
# `conflicting_options`, `verify_block`) are completely ignored.
|
25
25
|
FastlaneCore::ConfigItem.new(key: :url,
|
26
26
|
description: "The URL of the repository to import the Fastfile from",
|
27
|
-
|
27
|
+
optional: true),
|
28
28
|
FastlaneCore::ConfigItem.new(key: :branch,
|
29
29
|
description: "The branch or tag to check-out on the repository",
|
30
30
|
default_value: 'HEAD',
|
@@ -39,12 +39,10 @@ module Fastlane
|
|
39
39
|
optional: true),
|
40
40
|
FastlaneCore::ConfigItem.new(key: :version,
|
41
41
|
description: "The version to checkout on the repository. Optimistic match operator or multiple conditions can be used to select the latest version within constraints",
|
42
|
-
|
43
|
-
is_string: false,
|
42
|
+
type: Array,
|
44
43
|
optional: true),
|
45
44
|
FastlaneCore::ConfigItem.new(key: :cache_path,
|
46
45
|
description: "The path to a directory where the repository should be cloned into. Defaults to `nil`, which causes the repository to be cloned on every call, to a temporary directory",
|
47
|
-
default_value: nil,
|
48
46
|
optional: true)
|
49
47
|
]
|
50
48
|
end
|
@@ -66,11 +66,10 @@ module Fastlane
|
|
66
66
|
env_name: "FL_BUILD_NUMBER_BUILD_NUMBER",
|
67
67
|
description: "Change to a specific version. When you provide this parameter, Apple Generic Versioning does not have to be enabled",
|
68
68
|
optional: true,
|
69
|
-
|
69
|
+
skip_type_validation: true), # allow Integer, String
|
70
70
|
FastlaneCore::ConfigItem.new(key: :skip_info_plist,
|
71
71
|
env_name: "FL_BUILD_NUMBER_SKIP_INFO_PLIST",
|
72
72
|
description: "Don't update Info.plist files when updating the build version",
|
73
|
-
is_string: false,
|
74
73
|
type: Boolean,
|
75
74
|
default_value: false),
|
76
75
|
FastlaneCore::ConfigItem.new(key: :xcodeproj,
|
@@ -35,26 +35,23 @@ module Fastlane
|
|
35
35
|
short_option: "-X",
|
36
36
|
env_name: "FL_IOD_EXTRA",
|
37
37
|
description: "Extra Commandline arguments passed to ios-deploy",
|
38
|
-
optional: true,
|
39
|
-
is_string: true),
|
38
|
+
optional: true),
|
40
39
|
FastlaneCore::ConfigItem.new(key: :device_id,
|
41
40
|
short_option: "-d",
|
42
41
|
env_name: "FL_IOD_DEVICE_ID",
|
43
42
|
description: "id of the device / if not set defaults to first found device",
|
44
|
-
optional: true,
|
45
|
-
is_string: true),
|
43
|
+
optional: true),
|
46
44
|
FastlaneCore::ConfigItem.new(key: :skip_wifi,
|
47
45
|
short_option: "-w",
|
48
46
|
env_name: "FL_IOD_WIFI",
|
49
47
|
description: "Do not search for devices via WiFi",
|
50
48
|
optional: true,
|
51
|
-
|
49
|
+
type: Boolean),
|
52
50
|
FastlaneCore::ConfigItem.new(key: :ipa,
|
53
51
|
short_option: "-i",
|
54
52
|
env_name: "FL_IOD_IPA",
|
55
53
|
description: "The IPA file to put on the device",
|
56
54
|
optional: true,
|
57
|
-
is_string: true,
|
58
55
|
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] || Dir["*.ipa"].first,
|
59
56
|
default_value_dynamic: true,
|
60
57
|
verify_block: proc do |value|
|
@@ -66,35 +66,32 @@ module Fastlane
|
|
66
66
|
def self.available_options
|
67
67
|
[
|
68
68
|
FastlaneCore::ConfigItem.new(key: :api_token,
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
69
|
+
env_name: "INSTALLR_API_TOKEN",
|
70
|
+
sensitive: true,
|
71
|
+
description: "API Token for Installr Access",
|
72
|
+
verify_block: proc do |value|
|
73
|
+
UI.user_error!("No API token for Installr given, pass using `api_token: 'token'`") unless value && !value.empty?
|
74
|
+
end),
|
75
75
|
FastlaneCore::ConfigItem.new(key: :ipa,
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
76
|
+
env_name: "INSTALLR_IPA_PATH",
|
77
|
+
description: "Path to your IPA file. Optional if you use the _gym_ or _xcodebuild_ action",
|
78
|
+
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
|
79
|
+
default_value_dynamic: true,
|
80
|
+
verify_block: proc do |value|
|
81
|
+
UI.user_error!("Couldn't find build file at path '#{value}'") unless File.exist?(value)
|
82
|
+
end),
|
83
83
|
FastlaneCore::ConfigItem.new(key: :notes,
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
optional: true),
|
84
|
+
env_name: "INSTALLR_NOTES",
|
85
|
+
description: "Release notes",
|
86
|
+
optional: true),
|
88
87
|
FastlaneCore::ConfigItem.new(key: :notify,
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
optional: true),
|
88
|
+
env_name: "INSTALLR_NOTIFY",
|
89
|
+
description: "Groups to notify (e.g. 'dev,qa')",
|
90
|
+
optional: true),
|
93
91
|
FastlaneCore::ConfigItem.new(key: :add,
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
optional: true)
|
92
|
+
env_name: "INSTALLR_ADD",
|
93
|
+
description: "Groups to add (e.g. 'exec,ops')",
|
94
|
+
optional: true)
|
98
95
|
]
|
99
96
|
end
|
100
97
|
|
@@ -159,12 +159,12 @@ module Fastlane
|
|
159
159
|
env_name: "IPA_CLEAN",
|
160
160
|
description: "Clean project before building",
|
161
161
|
optional: true,
|
162
|
-
|
162
|
+
type: Boolean),
|
163
163
|
FastlaneCore::ConfigItem.new(key: :archive,
|
164
164
|
env_name: "IPA_ARCHIVE",
|
165
165
|
description: "Archive project after building",
|
166
166
|
optional: true,
|
167
|
-
|
167
|
+
type: Boolean),
|
168
168
|
FastlaneCore::ConfigItem.new(key: :destination,
|
169
169
|
env_name: "IPA_DESTINATION",
|
170
170
|
description: "Build destination. Defaults to current directory",
|
@@ -19,20 +19,14 @@ module Fastlane
|
|
19
19
|
|
20
20
|
def self.available_options
|
21
21
|
[
|
22
|
-
FastlaneCore::ConfigItem.new(
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
key: :module_version,
|
31
|
-
env_name: 'FL_JAZZY_MODULE_VERSION',
|
32
|
-
description: 'Version string to use as part of the the default docs title and inside the docset',
|
33
|
-
is_string: true,
|
34
|
-
optional: true
|
35
|
-
)
|
22
|
+
FastlaneCore::ConfigItem.new(key: :config,
|
23
|
+
env_name: 'FL_JAZZY_CONFIG',
|
24
|
+
description: 'Path to jazzy config file',
|
25
|
+
optional: true),
|
26
|
+
FastlaneCore::ConfigItem.new(key: :module_version,
|
27
|
+
env_name: 'FL_JAZZY_MODULE_VERSION',
|
28
|
+
description: 'Version string to use as part of the the default docs title and inside the docset',
|
29
|
+
optional: true)
|
36
30
|
]
|
37
31
|
end
|
38
32
|
|
@@ -3,8 +3,12 @@ module Fastlane
|
|
3
3
|
# Push local changes to the remote branch
|
4
4
|
class PushToGitRemoteAction < Action
|
5
5
|
def self.run(params)
|
6
|
+
# Find the local git branch using HEAD or fallback to CI's ENV git branch if you're in detached HEAD state
|
7
|
+
local_git_branch = Actions.git_branch_name_using_HEAD
|
8
|
+
local_git_branch = Actions.git_branch unless local_git_branch && local_git_branch != "HEAD"
|
9
|
+
|
6
10
|
local_branch = params[:local_branch]
|
7
|
-
local_branch ||=
|
11
|
+
local_branch ||= local_git_branch.gsub(%r{#{params[:remote]}\/}, '') if local_git_branch
|
8
12
|
UI.user_error!('Failed to get the current branch.') unless local_branch
|
9
13
|
|
10
14
|
remote_branch = params[:remote_branch] || local_branch
|
@@ -16,9 +16,11 @@ module Fastlane
|
|
16
16
|
|
17
17
|
platform = Spaceship::ConnectAPI::BundleIdPlatform.map(platform)
|
18
18
|
|
19
|
-
if (
|
20
|
-
UI.message("
|
21
|
-
Spaceship::ConnectAPI.token =
|
19
|
+
if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
|
20
|
+
UI.message("Creating authorization token for App Store Connect API")
|
21
|
+
Spaceship::ConnectAPI.token = api_token
|
22
|
+
elsif !Spaceship::ConnectAPI.token.nil?
|
23
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
22
24
|
else
|
23
25
|
UI.message("Login to App Store Connect (#{params[:username]})")
|
24
26
|
credentials = CredentialsManager::AccountManager.new(user: params[:username])
|
@@ -37,13 +39,6 @@ module Fastlane
|
|
37
39
|
return udid
|
38
40
|
end
|
39
41
|
|
40
|
-
def self.api_token(params)
|
41
|
-
params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
|
42
|
-
api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
|
43
|
-
api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
|
44
|
-
return api_token
|
45
|
-
end
|
46
|
-
|
47
42
|
def self.description
|
48
43
|
"Registers a new device to the Apple Dev Portal"
|
49
44
|
end
|
@@ -80,6 +75,8 @@ module Fastlane
|
|
80
75
|
env_names: ["FL_REGISTER_DEVICE_API_KEY", "APP_STORE_CONNECT_API_KEY"],
|
81
76
|
description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)",
|
82
77
|
type: Hash,
|
78
|
+
default_value: Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::APP_STORE_CONNECT_API_KEY],
|
79
|
+
default_value_dynamic: true,
|
83
80
|
optional: true,
|
84
81
|
sensitive: true,
|
85
82
|
conflicting_options: [:api_key_path]),
|
@@ -39,9 +39,11 @@ module Fastlane
|
|
39
39
|
end
|
40
40
|
|
41
41
|
require 'spaceship'
|
42
|
-
if (
|
43
|
-
UI.message("
|
44
|
-
Spaceship::ConnectAPI.token =
|
42
|
+
if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
|
43
|
+
UI.message("Creating authorization token for App Store Connect API")
|
44
|
+
Spaceship::ConnectAPI.token = api_token
|
45
|
+
elsif !Spaceship::ConnectAPI.token.nil?
|
46
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
45
47
|
else
|
46
48
|
UI.message("Login to App Store Connect (#{params[:username]})")
|
47
49
|
credentials = CredentialsManager::AccountManager.new(user: params[:username])
|
@@ -83,13 +85,6 @@ module Fastlane
|
|
83
85
|
UI.crash!("Failed to register new device (name: #{name}, UDID: #{udid})")
|
84
86
|
end
|
85
87
|
|
86
|
-
def self.api_token(params)
|
87
|
-
params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
|
88
|
-
api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
|
89
|
-
api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
|
90
|
-
return api_token
|
91
|
-
end
|
92
|
-
|
93
88
|
#####################################################
|
94
89
|
# @!group Documentation
|
95
90
|
#####################################################
|
@@ -129,6 +124,8 @@ module Fastlane
|
|
129
124
|
env_names: ["FL_REGISTER_DEVICES_API_KEY", "APP_STORE_CONNECT_API_KEY"],
|
130
125
|
description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)",
|
131
126
|
type: Hash,
|
127
|
+
default_value: Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::APP_STORE_CONNECT_API_KEY],
|
128
|
+
default_value_dynamic: true,
|
132
129
|
optional: true,
|
133
130
|
sensitive: true,
|
134
131
|
conflicting_options: [:api_key_path]),
|
@@ -6,9 +6,11 @@ module Fastlane
|
|
6
6
|
|
7
7
|
# Team selection passed though FASTLANE_ITC_TEAM_ID and FASTLANE_ITC_TEAM_NAME environment variables
|
8
8
|
# Prompts select team if multiple teams and none specified
|
9
|
-
if (
|
10
|
-
UI.message("
|
11
|
-
Spaceship::ConnectAPI.token =
|
9
|
+
if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
|
10
|
+
UI.message("Creating authorization token for App Store Connect API")
|
11
|
+
Spaceship::ConnectAPI.token = api_token
|
12
|
+
elsif !Spaceship::ConnectAPI.token.nil?
|
13
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
12
14
|
else
|
13
15
|
UI.message("Login to App Store Connect (#{params[:username]})")
|
14
16
|
Spaceship::ConnectAPI.login(params[:username], use_portal: false, use_tunes: true, tunes_team_id: params[:team_id], team_name: params[:team_name])
|
@@ -78,13 +80,6 @@ module Fastlane
|
|
78
80
|
UI.success("👼 Successfully pushed the new changelog to for #{edit_version.version_string}")
|
79
81
|
end
|
80
82
|
|
81
|
-
def self.api_token(params)
|
82
|
-
params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
|
83
|
-
api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
|
84
|
-
api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
|
85
|
-
return api_token
|
86
|
-
end
|
87
|
-
|
88
83
|
def self.default_changelog_path
|
89
84
|
File.join(FastlaneCore::FastlaneFolder.path.to_s, 'changelog.txt')
|
90
85
|
end
|
@@ -122,6 +117,8 @@ module Fastlane
|
|
122
117
|
env_names: ["FL_SET_CHANGELOG_API_KEY", "APP_STORE_CONNECT_API_KEY"],
|
123
118
|
description: "Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#use-return-value-and-pass-in-as-an-option)",
|
124
119
|
type: Hash,
|
120
|
+
default_value: Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::APP_STORE_CONNECT_API_KEY],
|
121
|
+
default_value_dynamic: true,
|
125
122
|
optional: true,
|
126
123
|
sensitive: true,
|
127
124
|
conflicting_options: [:api_key_path]),
|
@@ -11,8 +11,20 @@ module Fastlane
|
|
11
11
|
UI.user_error!("Your version of swiftlint (#{version}) does not support autocorrect mode.\nUpdate swiftlint using `brew update && brew upgrade swiftlint`")
|
12
12
|
end
|
13
13
|
|
14
|
+
# See 'Breaking' section release notes here: https://github.com/realm/SwiftLint/releases/tag/0.43.0
|
15
|
+
if params[:mode] == :autocorrect && version >= Gem::Version.new('0.43.0')
|
16
|
+
UI.deprecated("Your version of swiftlint (#{version}) has deprecated autocorrect mode, please start using fix mode in input param")
|
17
|
+
UI.important("For now, switching swiftlint mode `from :autocorrect to :fix` for you 😇")
|
18
|
+
params[:mode] = :fix
|
19
|
+
elsif params[:mode] == :fix && version < Gem::Version.new('0.43.0')
|
20
|
+
UI.important("Your version of swiftlint (#{version}) does not support fix mode.\nUpdate swiftlint using `brew update && brew upgrade swiftlint`")
|
21
|
+
UI.important("For now, switching swiftlint mode `from :fix to :autocorrect` for you 😇")
|
22
|
+
params[:mode] = :autocorrect
|
23
|
+
end
|
24
|
+
|
25
|
+
mode_format = params[:mode] == :fix ? "--" : ""
|
14
26
|
command = (params[:executable] || "swiftlint").dup
|
15
|
-
command << " #{params[:mode]}"
|
27
|
+
command << " #{mode_format}#{params[:mode]}"
|
16
28
|
command << optional_flags(params)
|
17
29
|
|
18
30
|
if params[:files]
|
@@ -55,7 +67,7 @@ module Fastlane
|
|
55
67
|
end
|
56
68
|
|
57
69
|
def self.supported_no_cache_option(params)
|
58
|
-
if
|
70
|
+
if [:autocorrect, :fix, :lint].include?(params[:mode])
|
59
71
|
return " --no-cache"
|
60
72
|
else
|
61
73
|
return ""
|
@@ -89,14 +101,13 @@ module Fastlane
|
|
89
101
|
[
|
90
102
|
FastlaneCore::ConfigItem.new(key: :mode,
|
91
103
|
env_name: "FL_SWIFTLINT_MODE",
|
92
|
-
description: "SwiftLint mode: :lint, :autocorrect or :analyze",
|
93
|
-
|
104
|
+
description: "SwiftLint mode: :lint, :fix, :autocorrect or :analyze",
|
105
|
+
type: Symbol,
|
94
106
|
default_value: :lint,
|
95
107
|
optional: true),
|
96
108
|
FastlaneCore::ConfigItem.new(key: :path,
|
97
109
|
env_name: "FL_SWIFTLINT_PATH",
|
98
110
|
description: "Specify path to lint",
|
99
|
-
is_string: true,
|
100
111
|
optional: true,
|
101
112
|
verify_block: proc do |value|
|
102
113
|
UI.user_error!("Couldn't find path '#{File.expand_path(value)}'") unless File.exist?(value)
|
@@ -113,20 +124,18 @@ module Fastlane
|
|
113
124
|
env_name: "FL_SWIFTLINT_STRICT",
|
114
125
|
description: 'Fail on warnings? (true/false)',
|
115
126
|
default_value: false,
|
116
|
-
is_string: false,
|
117
127
|
type: Boolean,
|
118
128
|
optional: true),
|
119
129
|
FastlaneCore::ConfigItem.new(key: :files,
|
120
130
|
env_name: "FL_SWIFTLINT_FILES",
|
121
131
|
description: 'List of files to process',
|
122
|
-
|
132
|
+
type: Array,
|
123
133
|
optional: true),
|
124
134
|
FastlaneCore::ConfigItem.new(key: :ignore_exit_status,
|
125
135
|
env_name: "FL_SWIFTLINT_IGNORE_EXIT_STATUS",
|
126
136
|
description: "Ignore the exit status of the SwiftLint command, so that serious violations \
|
127
137
|
don't fail the build (true/false)",
|
128
138
|
default_value: false,
|
129
|
-
is_string: false,
|
130
139
|
type: Boolean,
|
131
140
|
optional: true),
|
132
141
|
FastlaneCore::ConfigItem.new(key: :raise_if_swiftlint_error,
|
@@ -134,14 +143,12 @@ module Fastlane
|
|
134
143
|
description: "Raises an error if swiftlint fails, so you can fail CI/CD jobs if necessary \
|
135
144
|
(true/false)",
|
136
145
|
default_value: false,
|
137
|
-
is_string: false,
|
138
146
|
type: Boolean,
|
139
147
|
optional: true),
|
140
148
|
FastlaneCore::ConfigItem.new(key: :reporter,
|
141
149
|
env_name: "FL_SWIFTLINT_REPORTER",
|
142
150
|
description: "Choose output reporter. Available: xcode, json, csv, checkstyle, codeclimate, \
|
143
151
|
junit, html, emoji, sonarqube, markdown, github-actions-logging",
|
144
|
-
is_string: true,
|
145
152
|
optional: true,
|
146
153
|
verify_block: proc do |value|
|
147
154
|
available = ['xcode', 'json', 'csv', 'checkstyle', 'codeclimate', 'junit', 'html', 'emoji', 'sonarqube', 'markdown', 'github-actions-logging']
|
@@ -151,32 +158,27 @@ module Fastlane
|
|
151
158
|
env_name: "FL_SWIFTLINT_QUIET",
|
152
159
|
description: "Don't print status logs like 'Linting <file>' & 'Done linting'",
|
153
160
|
default_value: false,
|
154
|
-
is_string: false,
|
155
161
|
type: Boolean,
|
156
162
|
optional: true),
|
157
163
|
FastlaneCore::ConfigItem.new(key: :executable,
|
158
164
|
env_name: "FL_SWIFTLINT_EXECUTABLE",
|
159
165
|
description: "Path to the `swiftlint` executable on your machine",
|
160
|
-
is_string: true,
|
161
166
|
optional: true),
|
162
167
|
FastlaneCore::ConfigItem.new(key: :format,
|
163
168
|
env_name: "FL_SWIFTLINT_FORMAT",
|
164
169
|
description: "Format code when mode is :autocorrect",
|
165
170
|
default_value: false,
|
166
|
-
is_string: false,
|
167
171
|
type: Boolean,
|
168
172
|
optional: true),
|
169
173
|
FastlaneCore::ConfigItem.new(key: :no_cache,
|
170
174
|
env_name: "FL_SWIFTLINT_NO_CACHE",
|
171
175
|
description: "Ignore the cache when mode is :autocorrect or :lint",
|
172
176
|
default_value: false,
|
173
|
-
is_string: false,
|
174
177
|
type: Boolean,
|
175
178
|
optional: true),
|
176
179
|
FastlaneCore::ConfigItem.new(key: :compiler_log_path,
|
177
180
|
env_name: "FL_SWIFTLINT_COMPILER_LOG_PATH",
|
178
181
|
description: "Compiler log path when mode is :analyze",
|
179
|
-
is_string: true,
|
180
182
|
optional: true,
|
181
183
|
verify_block: proc do |value|
|
182
184
|
UI.user_error!("Couldn't find compiler_log_path '#{File.expand_path(value)}'") unless File.exist?(value)
|
@@ -10,7 +10,12 @@ module Fastlane
|
|
10
10
|
require 'match'
|
11
11
|
|
12
12
|
params.load_configuration_file("Matchfile")
|
13
|
-
|
13
|
+
|
14
|
+
# Only set :api_key from SharedValues if :api_key_path isn't set (conflicting options)
|
15
|
+
unless params[:api_key_path]
|
16
|
+
params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
|
17
|
+
end
|
18
|
+
|
14
19
|
Match::Runner.new.run(params)
|
15
20
|
|
16
21
|
define_profile_type(params)
|