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
@@ -26,9 +26,11 @@ module Deliver
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def login
|
29
|
-
if api_token
|
29
|
+
if (api_token = Spaceship::ConnectAPI::Token.from(hash: options[:api_key], filepath: options[:api_key_path]))
|
30
30
|
UI.message("Creating authorization token for App Store Connect API")
|
31
31
|
Spaceship::ConnectAPI.token = api_token
|
32
|
+
elsif !Spaceship::ConnectAPI.token.nil?
|
33
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
32
34
|
else
|
33
35
|
# Username is now optional since addition of App Store Connect API Key
|
34
36
|
# Force asking for username to prompt user if not already set
|
@@ -42,12 +44,6 @@ module Deliver
|
|
42
44
|
end
|
43
45
|
end
|
44
46
|
|
45
|
-
def api_token
|
46
|
-
@api_token ||= Spaceship::ConnectAPI::Token.create(**options[:api_key]) if options[:api_key]
|
47
|
-
@api_token ||= Spaceship::ConnectAPI::Token.from_json_file(options[:api_key_path]) if options[:api_key_path]
|
48
|
-
return @api_token
|
49
|
-
end
|
50
|
-
|
51
47
|
def run
|
52
48
|
verify_version if options[:app_version].to_s.length > 0 && !options[:skip_app_version_update]
|
53
49
|
|
@@ -118,7 +114,7 @@ module Deliver
|
|
118
114
|
app_version = options[:app_version]
|
119
115
|
UI.message("Making sure the latest version on App Store Connect matches '#{app_version}'...")
|
120
116
|
|
121
|
-
app =
|
117
|
+
app = Deliver.cache[:app]
|
122
118
|
|
123
119
|
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
124
120
|
changed = app.ensure_version!(app_version, platform: platform)
|
@@ -167,14 +163,14 @@ module Deliver
|
|
167
163
|
|
168
164
|
if upload_ipa
|
169
165
|
package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
|
170
|
-
app_id:
|
166
|
+
app_id: Deliver.cache[:app].id,
|
171
167
|
ipa_path: options[:ipa],
|
172
168
|
package_path: "/tmp",
|
173
169
|
platform: options[:platform]
|
174
170
|
)
|
175
171
|
elsif upload_pkg
|
176
172
|
package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(
|
177
|
-
app_id:
|
173
|
+
app_id: Deliver.cache[:app].id,
|
178
174
|
pkg_path: options[:pkg],
|
179
175
|
package_path: "/tmp",
|
180
176
|
platform: options[:platform]
|
@@ -191,7 +187,7 @@ module Deliver
|
|
191
187
|
end
|
192
188
|
|
193
189
|
def reject_version_if_possible
|
194
|
-
app =
|
190
|
+
app = Deliver.cache[:app]
|
195
191
|
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
196
192
|
if app.reject_version_if_possible!(platform: platform)
|
197
193
|
UI.success("Successfully rejected previous version!")
|
@@ -210,6 +206,7 @@ module Deliver
|
|
210
206
|
# If there are fewer than two teams, don't infer the provider.
|
211
207
|
def transporter_for_selected_team
|
212
208
|
# Use JWT auth
|
209
|
+
api_token = Spaceship::ConnectAPI.token
|
213
210
|
unless api_token.nil?
|
214
211
|
api_token.refresh! if api_token.expired?
|
215
212
|
return FastlaneCore::ItunesTransporter.new(nil, nil, false, nil, api_token.text)
|
@@ -39,7 +39,7 @@ module Deliver
|
|
39
39
|
# This method takes care of creating a new 'deliver' folder, containing the app metadata
|
40
40
|
# and screenshots folders
|
41
41
|
def generate_deliver_file(deliver_path, options)
|
42
|
-
app =
|
42
|
+
app = Deliver.cache[:app]
|
43
43
|
|
44
44
|
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
45
45
|
v = app.get_latest_app_store_version(platform: platform)
|
@@ -7,7 +7,7 @@ require 'fastlane_core/pkg_file_analyser'
|
|
7
7
|
module Deliver
|
8
8
|
class SubmitForReview
|
9
9
|
def submit!(options)
|
10
|
-
app =
|
10
|
+
app = Deliver.cache[:app]
|
11
11
|
|
12
12
|
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
13
13
|
version = app.get_edit_app_store_version(platform: platform)
|
@@ -82,7 +82,7 @@ module Deliver
|
|
82
82
|
def upload(options)
|
83
83
|
return if options[:skip_metadata]
|
84
84
|
|
85
|
-
app =
|
85
|
+
app = Deliver.cache[:app]
|
86
86
|
|
87
87
|
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
88
88
|
|
@@ -97,7 +97,7 @@ module Deliver
|
|
97
97
|
localised_options = LOCALISED_LIVE_VALUES
|
98
98
|
non_localised_options = NON_LOCALISED_LIVE_VALUES
|
99
99
|
|
100
|
-
if
|
100
|
+
if version.nil?
|
101
101
|
UI.message("Couldn't find live version, editing the current version on App Store Connect instead")
|
102
102
|
version = fetch_edit_app_store_version(app, platform)
|
103
103
|
# we don't want to update the localised_options and non_localised_options
|
@@ -342,7 +342,7 @@ module Deliver
|
|
342
342
|
|
343
343
|
set_review_information(version, options)
|
344
344
|
set_review_attachment_file(version, options)
|
345
|
-
set_app_rating(
|
345
|
+
set_app_rating(app_info, options)
|
346
346
|
end
|
347
347
|
|
348
348
|
# rubocop:enable Metrics/PerceivedComplexity
|
@@ -642,7 +642,7 @@ module Deliver
|
|
642
642
|
end
|
643
643
|
end
|
644
644
|
|
645
|
-
def set_app_rating(
|
645
|
+
def set_app_rating(app_info, options)
|
646
646
|
return unless options[:app_rating_config_path]
|
647
647
|
|
648
648
|
require 'json'
|
@@ -675,9 +675,23 @@ module Deliver
|
|
675
675
|
has_mapped_values = true
|
676
676
|
UI.deprecated("Age rating '#{k}' from iTunesConnect has been deprecated. Please replace with '#{v}'")
|
677
677
|
end
|
678
|
-
UI.deprecated("You can find more info at https://docs.fastlane.tools/actions/deliver/#reference") if has_mapped_values
|
679
678
|
|
680
|
-
|
679
|
+
# Handle App Store Connect deprecation/migrations of keys/values if possible
|
680
|
+
attributes, deprecation_messages, errors = Spaceship::ConnectAPI::AgeRatingDeclaration.map_deprecation_if_possible(attributes)
|
681
|
+
deprecation_messages.each do |message|
|
682
|
+
UI.deprecated(message)
|
683
|
+
end
|
684
|
+
|
685
|
+
unless errors.empty?
|
686
|
+
errors.each do |error|
|
687
|
+
UI.error(error)
|
688
|
+
end
|
689
|
+
UI.user_error!("There are Age Rating deprecation errors that cannot be solved automatically... Please apply any fixes and try again")
|
690
|
+
end
|
691
|
+
|
692
|
+
UI.deprecated("You can find more info at https://docs.fastlane.tools/actions/deliver/#reference") if has_mapped_values || !deprecation_messages.empty?
|
693
|
+
|
694
|
+
age_rating_declaration = app_info.fetch_age_rating_declaration
|
681
695
|
age_rating_declaration.update(attributes: attributes)
|
682
696
|
end
|
683
697
|
end
|
@@ -17,7 +17,7 @@ module Deliver
|
|
17
17
|
return if options[:skip_screenshots]
|
18
18
|
return if options[:edit_live]
|
19
19
|
|
20
|
-
app =
|
20
|
+
app = Deliver.cache[:app]
|
21
21
|
|
22
22
|
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
23
23
|
version = app.get_edit_app_store_version(platform: platform)
|
@@ -27,18 +27,15 @@ module Fastlane
|
|
27
27
|
FastlaneCore::ConfigItem.new(key: :serial,
|
28
28
|
env_name: "FL_ANDROID_SERIAL",
|
29
29
|
description: "Android serial of the device to use for this command",
|
30
|
-
is_string: true,
|
31
30
|
default_value: ""),
|
32
31
|
FastlaneCore::ConfigItem.new(key: :command,
|
33
32
|
env_name: "FL_ADB_COMMAND",
|
34
33
|
description: "All commands you want to pass to the adb command, e.g. `kill-server`",
|
35
|
-
optional: true,
|
36
|
-
is_string: true),
|
34
|
+
optional: true),
|
37
35
|
FastlaneCore::ConfigItem.new(key: :adb_path,
|
38
36
|
env_name: "FL_ADB_PATH",
|
39
37
|
optional: true,
|
40
38
|
description: "The path to your `adb` binary (can be left blank if the ANDROID_SDK_ROOT, ANDROID_HOME or ANDROID_SDK environment variable is set)",
|
41
|
-
is_string: true,
|
42
39
|
default_value: "adb")
|
43
40
|
]
|
44
41
|
end
|
@@ -27,7 +27,6 @@ module Fastlane
|
|
27
27
|
FastlaneCore::ConfigItem.new(key: :adb_path,
|
28
28
|
env_name: "FL_ADB_PATH",
|
29
29
|
description: "The path to your `adb` binary (can be left blank if the ANDROID_SDK_ROOT environment variable is set)",
|
30
|
-
is_string: true,
|
31
30
|
optional: true,
|
32
31
|
default_value: "adb")
|
33
32
|
]
|
@@ -63,7 +63,7 @@ module Fastlane
|
|
63
63
|
FastlaneCore::ConfigItem.new(key: :includes_lane,
|
64
64
|
env_name: "FL_GIT_TAG_INCLUDES_LANE",
|
65
65
|
description: "Whether the current lane should be included in the tag and message composition, e.g. '<grouping>/<lane>/<prefix><build_number><postfix>'",
|
66
|
-
|
66
|
+
type: Boolean,
|
67
67
|
default_value: true),
|
68
68
|
FastlaneCore::ConfigItem.new(key: :prefix,
|
69
69
|
env_name: "FL_GIT_TAG_PREFIX",
|
@@ -78,7 +78,7 @@ module Fastlane
|
|
78
78
|
description: "The build number. Defaults to the result of increment_build_number if you\'re using it",
|
79
79
|
default_value: Actions.lane_context[Actions::SharedValues::BUILD_NUMBER],
|
80
80
|
default_value_dynamic: true,
|
81
|
-
|
81
|
+
skip_type_validation: true, # skipping validation because we both allow integer and string
|
82
82
|
optional: true),
|
83
83
|
FastlaneCore::ConfigItem.new(key: :message,
|
84
84
|
env_name: "FL_GIT_TAG_MESSAGE",
|
@@ -94,13 +94,13 @@ module Fastlane
|
|
94
94
|
env_name: "FL_GIT_TAG_FORCE",
|
95
95
|
description: "Force adding the tag",
|
96
96
|
optional: true,
|
97
|
-
|
97
|
+
type: Boolean,
|
98
98
|
default_value: false),
|
99
99
|
FastlaneCore::ConfigItem.new(key: :sign,
|
100
100
|
env_name: "FL_GIT_TAG_SIGN",
|
101
101
|
description: "Make a GPG-signed tag, using the default e-mail address's key",
|
102
102
|
optional: true,
|
103
|
-
|
103
|
+
type: Boolean,
|
104
104
|
default_value: false)
|
105
105
|
]
|
106
106
|
end
|
@@ -27,10 +27,11 @@ module Fastlane
|
|
27
27
|
|
28
28
|
def self.get_build_number(params)
|
29
29
|
# Prompts select team if multiple teams and none specified
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
|
31
|
+
UI.message("Creating authorization token for App Store Connect API")
|
32
|
+
Spaceship::ConnectAPI.token = api_token
|
33
|
+
elsif !Spaceship::ConnectAPI.token.nil?
|
34
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
34
35
|
else
|
35
36
|
# Username is now optional since addition of App Store Connect API Key
|
36
37
|
# Force asking for username to prompt user if not already set
|
@@ -102,13 +103,6 @@ module Fastlane
|
|
102
103
|
versions.map(&:to_s).sort_by { |v| Gem::Version.new(v) }
|
103
104
|
end
|
104
105
|
|
105
|
-
def self.api_token(params)
|
106
|
-
params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]
|
107
|
-
api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
|
108
|
-
api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
|
109
|
-
return api_token
|
110
|
-
end
|
111
|
-
|
112
106
|
#####################################################
|
113
107
|
# @!group Documentation
|
114
108
|
#####################################################
|
@@ -133,13 +127,15 @@ module Fastlane
|
|
133
127
|
env_names: ["APPSTORE_BUILD_NUMBER_API_KEY", "APP_STORE_CONNECT_API_KEY"],
|
134
128
|
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)",
|
135
129
|
type: Hash,
|
130
|
+
default_value: Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::APP_STORE_CONNECT_API_KEY],
|
131
|
+
default_value_dynamic: true,
|
136
132
|
optional: true,
|
137
133
|
sensitive: true,
|
138
134
|
conflicting_options: [:api_key_path]),
|
139
135
|
FastlaneCore::ConfigItem.new(key: :initial_build_number,
|
140
136
|
env_name: "INITIAL_BUILD_NUMBER",
|
141
137
|
description: "sets the build number to given value if no build is in current train",
|
142
|
-
|
138
|
+
skip_type_validation: true), # as we also allow integers, which we convert to strings anyway
|
143
139
|
FastlaneCore::ConfigItem.new(key: :app_identifier,
|
144
140
|
short_option: "-a",
|
145
141
|
env_name: "FASTLANE_APP_IDENTIFIER",
|
@@ -159,7 +155,7 @@ module Fastlane
|
|
159
155
|
env_name: "APPSTORE_BUILD_NUMBER_LIVE_TEAM_ID",
|
160
156
|
description: "The ID of your App Store Connect team if you're in multiple teams",
|
161
157
|
optional: true,
|
162
|
-
|
158
|
+
skip_type_validation: true, # as we also allow integers, which we convert to strings anyway
|
163
159
|
code_gen_sensitive: true,
|
164
160
|
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_id),
|
165
161
|
default_value_dynamic: true,
|
@@ -171,7 +167,7 @@ module Fastlane
|
|
171
167
|
env_name: "APPSTORE_BUILD_NUMBER_LIVE",
|
172
168
|
description: "Query the live version (ready-for-sale)",
|
173
169
|
optional: true,
|
174
|
-
|
170
|
+
type: Boolean,
|
175
171
|
default_value: true),
|
176
172
|
FastlaneCore::ConfigItem.new(key: :version,
|
177
173
|
env_name: "LATEST_VERSION",
|
@@ -182,7 +178,6 @@ module Fastlane
|
|
182
178
|
env_name: "APPSTORE_PLATFORM",
|
183
179
|
description: "The platform to use (optional)",
|
184
180
|
optional: true,
|
185
|
-
is_string: true,
|
186
181
|
default_value: "ios",
|
187
182
|
verify_block: proc do |value|
|
188
183
|
UI.user_error!("The platform can only be ios, appletvos, or osx") unless %('ios', 'appletvos', 'osx').include?(value)
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'base64'
|
2
|
+
require 'spaceship'
|
2
3
|
|
3
4
|
module Fastlane
|
4
5
|
module Actions
|
@@ -37,6 +38,10 @@ module Fastlane
|
|
37
38
|
|
38
39
|
Actions.lane_context.set_sensitive(SharedValues::APP_STORE_CONNECT_API_KEY, key)
|
39
40
|
|
41
|
+
# Creates Spaceship API Key session
|
42
|
+
# User does not need to pass the token into any actions because of this
|
43
|
+
Spaceship::ConnectAPI.token = Spaceship::ConnectAPI::Token.create(**key) if options[:set_spaceship_token]
|
44
|
+
|
40
45
|
return key
|
41
46
|
end
|
42
47
|
|
@@ -83,8 +88,13 @@ module Fastlane
|
|
83
88
|
FastlaneCore::ConfigItem.new(key: :in_house,
|
84
89
|
env_name: "APP_STORE_CONNECT_API_KEY_IN_HOUSE",
|
85
90
|
description: "Is App Store or Enterprise (in house) team? App Store Connect API cannot determine this on its own (yet)",
|
86
|
-
|
87
|
-
|
91
|
+
type: Boolean,
|
92
|
+
default_value: false),
|
93
|
+
FastlaneCore::ConfigItem.new(key: :set_spaceship_token,
|
94
|
+
env_name: "APP_STORE_CONNECT_API_KEY_SET_SPACESHIP_TOKEN",
|
95
|
+
description: "Authorizes all Spaceship::ConnectAPI requests by automatically setting Spaceship::ConnectAPI.token",
|
96
|
+
type: Boolean,
|
97
|
+
default_value: true)
|
88
98
|
]
|
89
99
|
end
|
90
100
|
|
@@ -109,7 +109,6 @@ module Fastlane
|
|
109
109
|
FastlaneCore::ConfigItem.new(key: :api_host,
|
110
110
|
env_name: "APPETIZE_API_HOST",
|
111
111
|
description: "Appetize API host",
|
112
|
-
is_string: true,
|
113
112
|
default_value: 'api.appetize.io',
|
114
113
|
verify_block: proc do |value|
|
115
114
|
UI.user_error!("API host should not contain the scheme e.g. `https`") if value.start_with?('https')
|
@@ -118,29 +117,24 @@ module Fastlane
|
|
118
117
|
env_name: "APPETIZE_API_TOKEN",
|
119
118
|
sensitive: true,
|
120
119
|
description: "Appetize.io API Token",
|
121
|
-
is_string: true,
|
122
120
|
verify_block: proc do |value|
|
123
121
|
UI.user_error!("No API Token for Appetize.io given, pass using `api_token: 'token'`") unless value.to_s.length > 0
|
124
122
|
end),
|
125
123
|
FastlaneCore::ConfigItem.new(key: :url,
|
126
124
|
env_name: "APPETIZE_URL",
|
127
125
|
description: "URL from which the ipa file can be fetched. Alternative to :path",
|
128
|
-
is_string: true,
|
129
126
|
optional: true),
|
130
127
|
FastlaneCore::ConfigItem.new(key: :platform,
|
131
128
|
env_name: "APPETIZE_PLATFORM",
|
132
129
|
description: "Platform. Either `ios` or `android`",
|
133
|
-
is_string: true,
|
134
130
|
default_value: 'ios'),
|
135
131
|
FastlaneCore::ConfigItem.new(key: :path,
|
136
132
|
env_name: "APPETIZE_FILE_PATH",
|
137
133
|
description: "Path to zipped build on the local filesystem. Either this or `url` must be specified",
|
138
|
-
is_string: true,
|
139
134
|
optional: true),
|
140
135
|
FastlaneCore::ConfigItem.new(key: :public_key,
|
141
136
|
env_name: "APPETIZE_PUBLICKEY",
|
142
137
|
description: "If not provided, a new app will be created. If provided, the existing build will be overwritten",
|
143
|
-
is_string: true,
|
144
138
|
optional: true,
|
145
139
|
verify_block: proc do |value|
|
146
140
|
if value.start_with?("private_")
|
@@ -150,7 +144,6 @@ module Fastlane
|
|
150
144
|
FastlaneCore::ConfigItem.new(key: :note,
|
151
145
|
env_name: "APPETIZE_NOTE",
|
152
146
|
description: "Notes you wish to add to the uploaded app",
|
153
|
-
is_string: true,
|
154
147
|
optional: true),
|
155
148
|
FastlaneCore::ConfigItem.new(key: :timeout,
|
156
149
|
env_name: "APPETIZE_TIMEOUT",
|
@@ -50,7 +50,6 @@ module Fastlane
|
|
50
50
|
FastlaneCore::ConfigItem.new(key: :public_key,
|
51
51
|
env_name: "APPETIZE_PUBLICKEY",
|
52
52
|
description: "Public key of the app you wish to update",
|
53
|
-
is_string: true,
|
54
53
|
sensitive: true,
|
55
54
|
default_value: Actions.lane_context[SharedValues::APPETIZE_PUBLIC_KEY],
|
56
55
|
default_value_dynamic: true,
|
@@ -63,18 +62,15 @@ module Fastlane
|
|
63
62
|
FastlaneCore::ConfigItem.new(key: :base_url,
|
64
63
|
env_name: "APPETIZE_VIEWING_URL_GENERATOR_BASE",
|
65
64
|
description: "Base URL of Appetize service",
|
66
|
-
is_string: true,
|
67
65
|
default_value: "https://appetize.io/embed",
|
68
66
|
optional: true),
|
69
67
|
FastlaneCore::ConfigItem.new(key: :device,
|
70
68
|
env_name: "APPETIZE_VIEWING_URL_GENERATOR_DEVICE",
|
71
69
|
description: "Device type: iphone4s, iphone5s, iphone6, iphone6plus, ipadair, iphone6s, iphone6splus, ipadair2, nexus5, nexus7 or nexus9",
|
72
|
-
is_string: true,
|
73
70
|
default_value: "iphone5s"),
|
74
71
|
FastlaneCore::ConfigItem.new(key: :scale,
|
75
72
|
env_name: "APPETIZE_VIEWING_URL_GENERATOR_SCALE",
|
76
73
|
description: "Scale of the simulator",
|
77
|
-
is_string: true,
|
78
74
|
optional: true,
|
79
75
|
verify_block: proc do |value|
|
80
76
|
available = ["25", "50", "75", "100"]
|
@@ -83,7 +79,6 @@ module Fastlane
|
|
83
79
|
FastlaneCore::ConfigItem.new(key: :orientation,
|
84
80
|
env_name: "APPETIZE_VIEWING_URL_GENERATOR_ORIENTATION",
|
85
81
|
description: "Device orientation",
|
86
|
-
is_string: true,
|
87
82
|
default_value: "portrait",
|
88
83
|
verify_block: proc do |value|
|
89
84
|
available = ["portrait", "landscape"]
|
@@ -92,12 +87,10 @@ module Fastlane
|
|
92
87
|
FastlaneCore::ConfigItem.new(key: :language,
|
93
88
|
env_name: "APPETIZE_VIEWING_URL_GENERATOR_LANGUAGE",
|
94
89
|
description: "Device language in ISO 639-1 language code, e.g. 'de'",
|
95
|
-
is_string: true,
|
96
90
|
optional: true),
|
97
91
|
FastlaneCore::ConfigItem.new(key: :color,
|
98
92
|
env_name: "APPETIZE_VIEWING_URL_GENERATOR_COLOR",
|
99
93
|
description: "Color of the device",
|
100
|
-
is_string: true,
|
101
94
|
default_value: "black",
|
102
95
|
verify_block: proc do |value|
|
103
96
|
available = ["black", "white", "silver", "gray"]
|
@@ -106,22 +99,18 @@ module Fastlane
|
|
106
99
|
FastlaneCore::ConfigItem.new(key: :launch_url,
|
107
100
|
env_name: "APPETIZE_VIEWING_URL_GENERATOR_LAUNCH_URL",
|
108
101
|
description: "Specify a deep link to open when your app is launched",
|
109
|
-
is_string: true,
|
110
102
|
optional: true),
|
111
103
|
FastlaneCore::ConfigItem.new(key: :os_version,
|
112
104
|
env_name: "APPETIZE_VIEWING_URL_GENERATOR_OS_VERSION",
|
113
105
|
description: "The operating system version on which to run your app, e.g. 10.3, 8.0",
|
114
|
-
is_string: true,
|
115
106
|
optional: true),
|
116
107
|
FastlaneCore::ConfigItem.new(key: :params,
|
117
108
|
env_name: "APPETIZE_VIEWING_URL_GENERATOR_PARAMS",
|
118
109
|
description: "Specify params value to be passed to Appetize",
|
119
|
-
is_string: true,
|
120
110
|
optional: true),
|
121
111
|
FastlaneCore::ConfigItem.new(key: :proxy,
|
122
112
|
env_name: "APPETIZE_VIEWING_URL_GENERATOR_PROXY",
|
123
113
|
description: "Specify a HTTP proxy to be passed to Appetize",
|
124
|
-
is_string: true,
|
125
114
|
optional: true)
|
126
115
|
]
|
127
116
|
end
|