fastlane 2.146.0 → 2.149.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 +86 -86
- data/cert/lib/cert/commands_generator.rb +1 -0
- data/credentials_manager/lib/credentials_manager/cli.rb +2 -0
- data/deliver/lib/deliver/app_screenshot.rb +3 -3
- data/deliver/lib/deliver/commands_generator.rb +1 -0
- data/deliver/lib/deliver/html_generator.rb +2 -2
- data/deliver/lib/deliver/submit_for_review.rb +5 -1
- data/fastlane/lib/{fastlane/actions/.update_code_signing_settings.rb.swp → assets/.s3_html_template.erb.swp} +0 -0
- data/fastlane/lib/assets/custom_action_template.rb +6 -6
- data/fastlane/lib/assets/s3_html_template.erb +1 -1
- data/fastlane/lib/fastlane/actions/.hipchat.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/cocoapods.rb +1 -1
- data/fastlane/lib/fastlane/actions/crashlytics.rb +0 -4
- data/fastlane/lib/fastlane/actions/docs/build_app.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +42 -2
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +3 -1
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +12 -0
- data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +1 -1
- data/fastlane/lib/fastlane/actions/git_branch.rb +1 -1
- data/fastlane/lib/fastlane/actions/hipchat.rb +1 -1
- data/fastlane/lib/fastlane/actions/push_to_git_remote.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_pod_key.rb +3 -3
- data/fastlane/lib/fastlane/actions/slack.rb +1 -1
- data/fastlane/lib/fastlane/actions/slather.rb +8 -1
- data/fastlane/lib/fastlane/actions/swiftlint.rb +14 -0
- data/fastlane/lib/fastlane/actions/sync_code_signing.rb +1 -1
- data/fastlane/lib/fastlane/actions/testfairy.rb +18 -3
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +7 -2
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +2 -2
- data/fastlane/lib/fastlane/actions/verify_xcode.rb +7 -0
- data/fastlane/lib/fastlane/actions/xcodebuild.rb +4 -4
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +28 -6
- data/fastlane/lib/fastlane/commands_generator.rb +5 -2
- data/fastlane/lib/fastlane/documentation/actions_list.rb +1 -1
- data/fastlane/lib/fastlane/helper/lane_helper.rb +13 -0
- data/fastlane/lib/fastlane/lane_manager.rb +0 -10
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +3 -3
- data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +29 -0
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +15 -2
- data/fastlane/lib/fastlane/swift_lane_manager.rb +0 -8
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/Fastlane.swift +130 -26
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/LaneFileProtocol.swift +5 -2
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +9 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +15 -3
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +25 -1
- data/fastlane_core/lib/fastlane_core/helper.rb +17 -0
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +46 -2
- data/fastlane_core/lib/fastlane_core/project.rb +1 -0
- data/frameit/lib/frameit/commands_generator.rb +1 -0
- data/frameit/lib/frameit/device_types.rb +10 -0
- data/frameit/lib/frameit/options.rb +5 -2
- data/frameit/lib/frameit/runner.rb +5 -0
- data/frameit/lib/frameit/screenshot.rb +1 -0
- data/gym/lib/gym/generators/package_command_generator.rb +4 -0
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +4 -0
- data/gym/lib/gym/options.rb +1 -1
- data/gym/lib/gym/runner.rb +14 -0
- data/match/lib/match/change_password.rb +1 -18
- data/match/lib/match/commands_generator.rb +1 -0
- data/match/lib/match/encryption/openssl.rb +1 -1
- data/match/lib/match/generator.rb +7 -2
- data/match/lib/match/nuke.rb +21 -16
- data/match/lib/match/options.rb +23 -1
- data/match/lib/match/storage/git_storage.rb +4 -0
- data/match/lib/match/storage/google_cloud_storage.rb +4 -0
- data/match/lib/match/storage/interface.rb +4 -0
- data/match/lib/match/storage/s3_storage.rb +4 -0
- data/match/lib/match/utils.rb +1 -1
- data/pem/lib/pem/commands_generator.rb +1 -0
- data/pilot/lib/pilot/build_manager.rb +23 -7
- data/pilot/lib/pilot/options.rb +5 -0
- data/produce/lib/produce/commands_generator.rb +1 -0
- data/scan/lib/scan/.options.rb.swp +0 -0
- data/scan/lib/scan/detect_values.rb +3 -0
- data/scan/lib/scan/options.rb +26 -3
- data/scan/lib/scan/runner.rb +2 -0
- data/scan/lib/scan/test_command_generator.rb +7 -2
- data/scan/lib/scan/test_result_parser.rb +9 -2
- data/screengrab/lib/screengrab/runner.rb +10 -9
- data/sigh/lib/sigh/commands_generator.rb +1 -0
- data/sigh/lib/sigh/options.rb +7 -1
- data/sigh/lib/sigh/runner.rb +2 -1
- data/snapshot/lib/assets/SnapfileTemplate +3 -0
- data/snapshot/lib/assets/SnapshotHelper.swift +12 -33
- data/snapshot/lib/snapshot/detect_values.rb +15 -0
- data/snapshot/lib/snapshot/options.rb +42 -0
- data/snapshot/lib/snapshot/reports_generator.rb +1 -1
- data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +4 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +24 -1
- data/snapshot/lib/snapshot/test_command_generator.rb +8 -3
- data/snapshot/lib/snapshot/test_command_generator_base.rb +10 -1
- data/spaceship/lib/spaceship/base.rb +1 -1
- data/spaceship/lib/spaceship/client.rb +9 -1
- data/spaceship/lib/spaceship/commands_generator.rb +1 -0
- data/spaceship/lib/spaceship/connect_api/model.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
- data/spaceship/lib/spaceship/errors.rb +3 -0
- data/spaceship/lib/spaceship/tunes/iap.rb +15 -0
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +14 -0
- data/supply/lib/supply/commands_generator.rb +1 -0
- data/supply/lib/supply/options.rb +9 -0
- data/supply/lib/supply/uploader.rb +4 -0
- metadata +47 -30
data/gym/lib/gym/options.rb
CHANGED
@@ -155,7 +155,7 @@ module Gym
|
|
155
155
|
end),
|
156
156
|
FastlaneCore::ConfigItem.new(key: :installer_cert_name,
|
157
157
|
env_name: "GYM_INSTALLER_CERT_NAME",
|
158
|
-
description: "Full name of 3rd Party Mac Developer Installer or
|
158
|
+
description: "Full name of 3rd Party Mac Developer Installer or Developer ID Installer certificate. Example: `3rd Party Mac Developer Installer: Your Company (ABC1234XWYZ)`",
|
159
159
|
type: String,
|
160
160
|
optional: true),
|
161
161
|
# Very optional
|
data/gym/lib/gym/runner.rb
CHANGED
@@ -40,6 +40,7 @@ module Gym
|
|
40
40
|
move_app_thinning_size_report
|
41
41
|
move_apps_folder
|
42
42
|
move_asset_packs
|
43
|
+
move_appstore_info
|
43
44
|
elsif is_mac
|
44
45
|
path = File.expand_path(Gym.config[:output_directory])
|
45
46
|
compress_and_move_dsym
|
@@ -49,6 +50,7 @@ module Gym
|
|
49
50
|
|
50
51
|
package_app
|
51
52
|
path = move_pkg
|
53
|
+
move_appstore_info
|
52
54
|
return path
|
53
55
|
end
|
54
56
|
copy_files_from_path(File.join(BuildCommandGenerator.archive_path, "Products/usr/local/bin/*")) if Gym.project.command_line_tool?
|
@@ -339,6 +341,18 @@ module Gym
|
|
339
341
|
end
|
340
342
|
end
|
341
343
|
|
344
|
+
# Move the AppStoreInfo.plist folder to the output directory
|
345
|
+
def move_appstore_info
|
346
|
+
if File.exist?(PackageCommandGenerator.appstore_info_path)
|
347
|
+
FileUtils.mv(PackageCommandGenerator.appstore_info_path, File.expand_path(Gym.config[:output_directory]), force: true)
|
348
|
+
appstore_info_path = File.join(File.expand_path(Gym.config[:output_directory]), File.basename(PackageCommandGenerator.appstore_info_path))
|
349
|
+
|
350
|
+
UI.success("Successfully exported the AppStoreInfo.plist file:")
|
351
|
+
UI.message(appstore_info_path)
|
352
|
+
appstore_info_path
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
342
356
|
def find_archive_path
|
343
357
|
Dir.glob(File.join(BuildCommandGenerator.build_path, "*.ipa")).last
|
344
358
|
end
|
@@ -16,7 +16,7 @@ module Match
|
|
16
16
|
|
17
17
|
ensure_ui_interactive
|
18
18
|
|
19
|
-
to =
|
19
|
+
to = FastlaneCore::Helper.ask_password(message: "New passphrase for Git Repo: ", confirm: true)
|
20
20
|
|
21
21
|
# Choose the right storage and encryption implementations
|
22
22
|
storage = Storage.for_mode(params[:storage_mode], {
|
@@ -44,23 +44,6 @@ module Match
|
|
44
44
|
storage.save_changes!(files_to_commit: files_to_commit, custom_message: message)
|
45
45
|
end
|
46
46
|
|
47
|
-
# This method is called from both here, and from `openssl.rb`
|
48
|
-
def self.ask_password(message: "Passphrase for Match storage: ", confirm: nil)
|
49
|
-
ensure_ui_interactive
|
50
|
-
loop do
|
51
|
-
password = UI.password(message)
|
52
|
-
if confirm
|
53
|
-
password2 = UI.password("Type passphrase again: ")
|
54
|
-
if password == password2
|
55
|
-
return password
|
56
|
-
end
|
57
|
-
else
|
58
|
-
return password
|
59
|
-
end
|
60
|
-
UI.error("Passphrases differ. Try again")
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
47
|
def self.ensure_ui_interactive
|
65
48
|
raise "This code should only run in interactive mode" unless UI.interactive?
|
66
49
|
end
|
@@ -35,6 +35,7 @@ module Match
|
|
35
35
|
program :help_formatter, :compact
|
36
36
|
|
37
37
|
global_option('--verbose') { FastlaneCore::Globals.verbose = true }
|
38
|
+
global_option('--env STRING[,STRING2]', String, 'Add environment(s) to use with `dotenv`')
|
38
39
|
|
39
40
|
command :run do |c|
|
40
41
|
c.syntax = 'fastlane match'
|
@@ -99,7 +99,7 @@ module Match
|
|
99
99
|
UI.important("Enter the passphrase that should be used to encrypt/decrypt your certificates")
|
100
100
|
UI.important("This passphrase is specific per repository and will be stored in your local keychain")
|
101
101
|
UI.important("Make sure to remember the password, as you'll need it when you run match on a different machine")
|
102
|
-
password =
|
102
|
+
password = FastlaneCore::Helper.ask_password(message: "Passphrase for Match storage: ", confirm: true)
|
103
103
|
store_password(password)
|
104
104
|
end
|
105
105
|
end
|
@@ -60,7 +60,11 @@ module Match
|
|
60
60
|
names << params[:platform]
|
61
61
|
end
|
62
62
|
|
63
|
-
profile_name
|
63
|
+
if params[:profile_name].to_s.empty?
|
64
|
+
profile_name = names.join(" ")
|
65
|
+
else
|
66
|
+
profile_name = params[:profile_name]
|
67
|
+
end
|
64
68
|
|
65
69
|
values = {
|
66
70
|
app_identifier: app_identifier,
|
@@ -72,7 +76,8 @@ module Match
|
|
72
76
|
ignore_profiles_with_different_name: true,
|
73
77
|
team_id: params[:team_id],
|
74
78
|
team_name: params[:team_name],
|
75
|
-
template_name: params[:template_name]
|
79
|
+
template_name: params[:template_name],
|
80
|
+
fail_on_name_taken: params[:fail_on_name_taken]
|
76
81
|
}
|
77
82
|
|
78
83
|
values[:platform] = params[:platform]
|
data/match/lib/match/nuke.rb
CHANGED
@@ -27,6 +27,8 @@ module Match
|
|
27
27
|
|
28
28
|
update_optional_values_depending_on_storage_type(params)
|
29
29
|
|
30
|
+
spaceship_login
|
31
|
+
|
30
32
|
self.storage = Storage.for_mode(params[:storage_mode], {
|
31
33
|
git_url: params[:git_url],
|
32
34
|
shallow_clone: params[:shallow_clone],
|
@@ -41,7 +43,8 @@ module Match
|
|
41
43
|
s3_region: params[:s3_region].to_s,
|
42
44
|
s3_access_key: params[:s3_access_key].to_s,
|
43
45
|
s3_secret_access_key: params[:s3_secret_access_key].to_s,
|
44
|
-
s3_bucket: params[:s3_bucket].to_s
|
46
|
+
s3_bucket: params[:s3_bucket].to_s,
|
47
|
+
team_id: params[:team_id] || Spaceship.client.team_id
|
45
48
|
})
|
46
49
|
self.storage.download
|
47
50
|
|
@@ -93,17 +96,7 @@ module Match
|
|
93
96
|
end
|
94
97
|
end
|
95
98
|
|
96
|
-
|
97
|
-
def prepare_list
|
98
|
-
UI.message("Fetching certificates and profiles...")
|
99
|
-
cert_type = Match.cert_type_sym(type)
|
100
|
-
cert_types = [cert_type]
|
101
|
-
|
102
|
-
prov_types = []
|
103
|
-
prov_types = [:development] if cert_type == :development
|
104
|
-
prov_types = [:appstore, :adhoc, :developer_id] if cert_type == :distribution
|
105
|
-
prov_types = [:enterprise] if cert_type == :enterprise
|
106
|
-
|
99
|
+
def spaceship_login
|
107
100
|
Spaceship.login(params[:username])
|
108
101
|
Spaceship.select_team(team_id: params[:team_id], team_name: params[:team_name])
|
109
102
|
|
@@ -116,6 +109,18 @@ module Match
|
|
116
109
|
|
117
110
|
UI.user_error!("Enterprise account nuke cancelled") unless UI.confirm("Do you really want to nuke your Enterprise account?")
|
118
111
|
end
|
112
|
+
end
|
113
|
+
|
114
|
+
# Collect all the certs/profiles
|
115
|
+
def prepare_list
|
116
|
+
UI.message("Fetching certificates and profiles...")
|
117
|
+
cert_type = Match.cert_type_sym(type)
|
118
|
+
cert_types = [cert_type]
|
119
|
+
|
120
|
+
prov_types = []
|
121
|
+
prov_types = [:development] if cert_type == :development
|
122
|
+
prov_types = [:appstore, :adhoc, :developer_id] if cert_type == :distribution
|
123
|
+
prov_types = [:enterprise] if cert_type == :enterprise
|
119
124
|
|
120
125
|
# Get all iOS and macOS profile
|
121
126
|
self.profiles = []
|
@@ -141,15 +146,15 @@ module Match
|
|
141
146
|
certs = []
|
142
147
|
keys = []
|
143
148
|
cert_types.each do |ct|
|
144
|
-
certs +=
|
145
|
-
keys +=
|
149
|
+
certs += self.storage.list_files(file_name: ct.to_s, file_ext: "cer")
|
150
|
+
keys += self.storage.list_files(file_name: ct.to_s, file_ext: "p12")
|
146
151
|
end
|
147
152
|
|
148
153
|
# Finds all the iOS and macOS profofiles in the file storage
|
149
154
|
profiles = []
|
150
155
|
prov_types.each do |prov_type|
|
151
|
-
profiles +=
|
152
|
-
profiles +=
|
156
|
+
profiles += self.storage.list_files(file_name: prov_type.to_s, file_ext: "mobileprovision")
|
157
|
+
profiles += self.storage.list_files(file_name: prov_type.to_s, file_ext: "provisionprofile")
|
153
158
|
end
|
154
159
|
|
155
160
|
self.files = certs + keys + profiles
|
data/match/lib/match/options.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'fastlane_core/configuration/config_item'
|
2
|
+
require 'fastlane/helper/lane_helper'
|
2
3
|
require 'credentials_manager/appfile_config'
|
3
4
|
require_relative 'module'
|
4
5
|
|
@@ -10,6 +11,15 @@ module Match
|
|
10
11
|
@available_options << option
|
11
12
|
end
|
12
13
|
|
14
|
+
def self.default_platform
|
15
|
+
case Fastlane::Helper::LaneHelper.current_platform.to_s
|
16
|
+
when "mac"
|
17
|
+
"macos"
|
18
|
+
else
|
19
|
+
"ios"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
13
23
|
def self.available_options
|
14
24
|
user = CredentialsManager::AppfileConfig.try_fetch_value(:apple_dev_portal_id)
|
15
25
|
user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
|
@@ -215,7 +225,8 @@ module Match
|
|
215
225
|
short_option: '-o',
|
216
226
|
env_name: "MATCH_PLATFORM",
|
217
227
|
description: "Set the provisioning profile's platform to work with (i.e. ios, tvos, macos)",
|
218
|
-
default_value:
|
228
|
+
default_value: default_platform,
|
229
|
+
default_value_dynamic: true,
|
219
230
|
verify_block: proc do |value|
|
220
231
|
value = value.to_s
|
221
232
|
pt = %w(tvos ios macos)
|
@@ -226,6 +237,17 @@ module Match
|
|
226
237
|
description: "The name of provisioning profile template. If the developer account has provisioning profile templates (aka: custom entitlements), the template name can be found by inspecting the Entitlements drop-down while creating/editing a provisioning profile (e.g. \"Apple Pay Pass Suppression Development\")",
|
227
238
|
optional: true,
|
228
239
|
default_value: nil),
|
240
|
+
FastlaneCore::ConfigItem.new(key: :profile_name,
|
241
|
+
env_name: "MATCH_PROVISIONING_PROFILE_NAME",
|
242
|
+
description: "A custom name for the provisioning profile. This will replace the default provisioning profile name if specified",
|
243
|
+
optional: true,
|
244
|
+
default_value: nil),
|
245
|
+
FastlaneCore::ConfigItem.new(key: :fail_on_name_taken,
|
246
|
+
env_name: "MATCH_FAIL_ON_NAME_TAKEN",
|
247
|
+
description: "Should the command fail if it was about to create a duplicate of an existing provisioning profile. It can happen due to issues on Apple Developer Portal, when profile to be recreated was not properly deleted first",
|
248
|
+
optional: true,
|
249
|
+
type: Boolean,
|
250
|
+
default_value: false),
|
229
251
|
FastlaneCore::ConfigItem.new(key: :output_path,
|
230
252
|
env_name: "MATCH_OUTPUT_PATH",
|
231
253
|
description: "Path in which to export certificates, key and profile",
|
@@ -152,6 +152,10 @@ module Match
|
|
152
152
|
return "git_url(\"#{url}\")"
|
153
153
|
end
|
154
154
|
|
155
|
+
def list_files(file_name: "", file_ext: "")
|
156
|
+
Dir[File.join(working_directory, "**", file_name, "*.#{file_ext}")]
|
157
|
+
end
|
158
|
+
|
155
159
|
private
|
156
160
|
|
157
161
|
# Create and checkout an specific branch in the git repo
|
@@ -180,6 +180,10 @@ module Match
|
|
180
180
|
false
|
181
181
|
end
|
182
182
|
|
183
|
+
def list_files(file_name: "", file_ext: "")
|
184
|
+
Dir[File.join(working_directory, self.team_id, "**", file_name, "*.#{file_ext}")]
|
185
|
+
end
|
186
|
+
|
183
187
|
def generate_matchfile_content
|
184
188
|
return "google_cloud_bucket_name(\"#{self.bucket_name}\")"
|
185
189
|
end
|
@@ -96,6 +96,10 @@ module Match
|
|
96
96
|
not_implemented(__method__)
|
97
97
|
end
|
98
98
|
|
99
|
+
def list_files(file_name: "", file_ext: "")
|
100
|
+
not_implemented(__method__)
|
101
|
+
end
|
102
|
+
|
99
103
|
# Implement this for the `fastlane match init` command
|
100
104
|
# This method must return the content of the Matchfile
|
101
105
|
# that should be generated
|
@@ -139,6 +139,10 @@ module Match
|
|
139
139
|
false
|
140
140
|
end
|
141
141
|
|
142
|
+
def list_files(file_name: "", file_ext: "")
|
143
|
+
Dir[File.join(working_directory, self.team_id, "**", file_name, "*.#{file_ext}")]
|
144
|
+
end
|
145
|
+
|
142
146
|
# Implement this for the `fastlane match init` command
|
143
147
|
# This method must return the content of the Matchfile
|
144
148
|
# that should be generated
|
data/match/lib/match/utils.rb
CHANGED
@@ -4,7 +4,7 @@ require_relative 'module'
|
|
4
4
|
|
5
5
|
module Match
|
6
6
|
class Utils
|
7
|
-
def self.import(item_path, keychain, password:
|
7
|
+
def self.import(item_path, keychain, password: nil)
|
8
8
|
keychain_path = FastlaneCore::Helper.keychain_path(keychain)
|
9
9
|
FastlaneCore::KeychainImporter.import_file(item_path, keychain_path, keychain_password: password, output: FastlaneCore::Globals.verbose?)
|
10
10
|
end
|
@@ -25,6 +25,7 @@ module PEM
|
|
25
25
|
program :help_formatter, :compact
|
26
26
|
|
27
27
|
global_option('--verbose') { FastlaneCore::Globals.verbose = true }
|
28
|
+
global_option('--env STRING[,STRING2]', String, 'Add environment(s) to use with `dotenv`')
|
28
29
|
|
29
30
|
command :renew do |c|
|
30
31
|
c.syntax = 'fastlane pem renew'
|
@@ -154,13 +154,11 @@ module Pilot
|
|
154
154
|
|
155
155
|
return if config[:skip_submission]
|
156
156
|
if options[:reject_build_waiting_for_review]
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
UI.success("Deleted beta app review submission for previous build: #{waiting_for_review_build.app_version} - #{waiting_for_review_build.version}")
|
163
|
-
end
|
157
|
+
reject_build_waiting_for_review(build)
|
158
|
+
end
|
159
|
+
|
160
|
+
if options[:expire_previous_builds]
|
161
|
+
expire_previous_builds(build)
|
164
162
|
end
|
165
163
|
|
166
164
|
if !build.ready_for_internal_testing? && options[:skip_waiting_for_build_processing]
|
@@ -318,6 +316,24 @@ module Pilot
|
|
318
316
|
!options[:localized_build_info].nil?
|
319
317
|
end
|
320
318
|
|
319
|
+
def reject_build_waiting_for_review(build)
|
320
|
+
waiting_for_review_build = build.app.get_builds(filter: { "betaAppReviewSubmission.betaReviewState" => "WAITING_FOR_REVIEW" }, includes: "betaAppReviewSubmission,preReleaseVersion").first
|
321
|
+
unless waiting_for_review_build.nil?
|
322
|
+
UI.important("Another build is already in review. Going to remove that build and submit the new one.")
|
323
|
+
UI.important("Deleting beta app review submission for build: #{waiting_for_review_build.app_version} - #{waiting_for_review_build.version}")
|
324
|
+
waiting_for_review_build.beta_app_review_submission.delete!
|
325
|
+
UI.success("Deleted beta app review submission for previous build: #{waiting_for_review_build.app_version} - #{waiting_for_review_build.version}")
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
def expire_previous_builds(build)
|
330
|
+
builds_to_expire = build.app.get_builds.reject do |asc_build|
|
331
|
+
asc_build.id == build.id
|
332
|
+
end
|
333
|
+
|
334
|
+
builds_to_expire.each(&:expire!)
|
335
|
+
end
|
336
|
+
|
321
337
|
# If itc_provider was explicitly specified, use it.
|
322
338
|
# If there are multiple teams, infer the provider from the selected team name.
|
323
339
|
# If there are fewer than two teams, don't infer the provider.
|
data/pilot/lib/pilot/options.rb
CHANGED
@@ -170,6 +170,11 @@ module Pilot
|
|
170
170
|
env_name: "PILOT_BUILD_NUMBER",
|
171
171
|
description: "The build number of the application build to distribute. If the build number is not specified, the most recent build is distributed",
|
172
172
|
optional: true),
|
173
|
+
FastlaneCore::ConfigItem.new(key: :expire_previous_builds,
|
174
|
+
is_string: false,
|
175
|
+
env_name: "PILOT_EXPIRE_PREVIOUS_BUILDS",
|
176
|
+
description: "Should expire previous builds?",
|
177
|
+
default_value: false),
|
173
178
|
|
174
179
|
# testers
|
175
180
|
FastlaneCore::ConfigItem.new(key: :first_name,
|
@@ -26,6 +26,7 @@ module Produce
|
|
26
26
|
program :help_formatter, :compact
|
27
27
|
|
28
28
|
global_option('--verbose') { FastlaneCore::Globals.verbose = true }
|
29
|
+
global_option('--env STRING[,STRING2]', String, 'Add environment(s) to use with `dotenv`')
|
29
30
|
|
30
31
|
command :create do |c|
|
31
32
|
c.syntax = 'fastlane produce create'
|
Binary file
|
data/scan/lib/scan/options.rb
CHANGED
@@ -123,12 +123,30 @@ module Scan
|
|
123
123
|
verify_type('skip_testing', [Array, String], value)
|
124
124
|
end),
|
125
125
|
|
126
|
-
#
|
126
|
+
# test plans to run
|
127
127
|
FastlaneCore::ConfigItem.new(key: :testplan,
|
128
128
|
env_name: "SCAN_TESTPLAN",
|
129
129
|
description: "The testplan associated with the scheme that should be used for testing",
|
130
130
|
is_string: true,
|
131
131
|
optional: true),
|
132
|
+
FastlaneCore::ConfigItem.new(key: :only_test_configurations,
|
133
|
+
env_name: "SCAN_ONLY_TEST_CONFIGURATIONS",
|
134
|
+
description: "Array of strings matching test plan configurations to run",
|
135
|
+
optional: true,
|
136
|
+
is_string: false,
|
137
|
+
verify_block: proc do |value|
|
138
|
+
verify_type('only_test_configurations', [Array, String], value)
|
139
|
+
end),
|
140
|
+
FastlaneCore::ConfigItem.new(key: :skip_test_configurations,
|
141
|
+
env_name: "SCAN_SKIP_TEST_CONFIGURATIONS",
|
142
|
+
description: "Array of strings matching test plan configurations to skip",
|
143
|
+
optional: true,
|
144
|
+
is_string: false,
|
145
|
+
verify_block: proc do |value|
|
146
|
+
verify_type('skip_test_configurations', [Array, String], value)
|
147
|
+
end),
|
148
|
+
|
149
|
+
# other test options
|
132
150
|
FastlaneCore::ConfigItem.new(key: :xctestrun,
|
133
151
|
short_option: "-X",
|
134
152
|
env_name: "SCAN_XCTESTRUN",
|
@@ -180,6 +198,11 @@ module Scan
|
|
180
198
|
description: "Should the HTML report be opened when tests are completed?",
|
181
199
|
is_string: false,
|
182
200
|
default_value: false),
|
201
|
+
FastlaneCore::ConfigItem.new(key: :disable_xcpretty,
|
202
|
+
env_name: "SCAN_DISABLE_XCPRETTY",
|
203
|
+
description: "Disable xcpretty formatting of build, similar to `output_style='raw'` but this will also skip the test results table",
|
204
|
+
type: Boolean,
|
205
|
+
optional: true),
|
183
206
|
FastlaneCore::ConfigItem.new(key: :output_directory,
|
184
207
|
short_option: "-o",
|
185
208
|
env_name: "SCAN_OUTPUT_DIRECTORY",
|
@@ -191,7 +214,7 @@ module Scan
|
|
191
214
|
FastlaneCore::ConfigItem.new(key: :output_style,
|
192
215
|
short_option: "-b",
|
193
216
|
env_name: "SCAN_OUTPUT_STYLE",
|
194
|
-
description: "Define how the output should look like. Valid values are: standard, basic, rspec, or raw (disables xcpretty)",
|
217
|
+
description: "Define how the output should look like. Valid values are: standard, basic, rspec, or raw (disables xcpretty during xcodebuild)",
|
195
218
|
optional: true,
|
196
219
|
verify_block: proc do |value|
|
197
220
|
UI.user_error!("Invalid output_style #{value}") unless ['standard', 'basic', 'rspec', 'raw'].include?(value)
|
@@ -375,7 +398,7 @@ module Scan
|
|
375
398
|
FastlaneCore::ConfigItem.new(key: :slack_icon_url,
|
376
399
|
env_name: "SCAN_SLACK_ICON_URL",
|
377
400
|
description: "Overrides the webhook's image property if slack_use_webhook_configured_username_and_icon is false",
|
378
|
-
default_value: "https://
|
401
|
+
default_value: "https://fastlane.tools/assets/img/fastlane_icon.png",
|
379
402
|
is_string: true,
|
380
403
|
optional: true),
|
381
404
|
FastlaneCore::ConfigItem.new(key: :skip_slack,
|