fastlane 2.163.0 → 2.168.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 +80 -80
- data/cert/lib/cert/options.rb +1 -1
- data/cert/lib/cert/runner.rb +2 -2
- data/deliver/lib/deliver/app_screenshot.rb +6 -2
- data/deliver/lib/deliver/queue_worker.rb +14 -29
- data/deliver/lib/deliver/upload_metadata.rb +7 -2
- data/deliver/lib/deliver/upload_screenshots.rb +3 -5
- data/fastlane/lib/fastlane/actions/.download_dsyms.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/actions_helper.rb +1 -1
- data/fastlane/lib/fastlane/actions/add_git_tag.rb +9 -2
- data/fastlane/lib/fastlane/actions/appledoc.rb +1 -1
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +5 -1
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +9 -0
- data/fastlane/lib/fastlane/actions/import_from_git.rb +9 -1
- data/fastlane/lib/fastlane/actions/is_ci.rb +1 -1
- data/fastlane/lib/fastlane/actions/register_devices.rb +4 -1
- data/fastlane/lib/fastlane/actions/set_changelog.rb +31 -3
- data/fastlane/lib/fastlane/actions/slather.rb +2 -2
- data/fastlane/lib/fastlane/actions/spm.rb +6 -0
- data/fastlane/lib/fastlane/actions/update_fastlane.rb +29 -8
- data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +3 -3
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +2 -2
- data/fastlane/lib/fastlane/fast_file.rb +74 -23
- data/fastlane/lib/fastlane/features.rb +1 -1
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +2 -0
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +1 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +1 -1
- data/fastlane/swift/Fastfile.swift +1 -1
- data/fastlane/swift/Fastlane.swift +37 -16
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/LaneFileProtocol.swift +2 -2
- data/fastlane/swift/MainProcess.swift +2 -0
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +8 -4
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
- data/fastlane/swift/Runner.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +5 -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_core/lib/fastlane_core/cert_checker.rb +12 -7
- data/fastlane_core/lib/fastlane_core/device_manager.rb +8 -4
- data/fastlane_core/lib/fastlane_core/helper.rb +11 -3
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +3 -3
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -1
- data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +3 -1
- data/fastlane_core/lib/fastlane_core/ui/disable_colors.rb +8 -0
- data/gym/lib/gym/code_signing_mapping.rb +1 -1
- data/match/lib/match/importer.rb +33 -21
- data/match/lib/match/module.rb +1 -1
- data/match/lib/match/nuke.rb +9 -5
- data/match/lib/match/options.rb +8 -2
- data/pilot/lib/pilot/build_manager.rb +9 -3
- data/scan/lib/scan/detect_values.rb +8 -9
- data/scan/lib/scan/module.rb +4 -0
- data/scan/lib/scan/options.rb +9 -0
- data/scan/lib/scan/runner.rb +4 -3
- data/sigh/lib/assets/resign.sh +1 -1
- data/sigh/lib/sigh/runner.rb +4 -4
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +2 -1
- data/snapshot/lib/snapshot/test_command_generator.rb +1 -1
- data/snapshot/lib/snapshot/test_command_generator_base.rb +3 -1
- data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +1 -1
- data/spaceship/lib/spaceship/connect_api.rb +2 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +7 -4
- data/spaceship/lib/spaceship/connect_api/models/.app.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/models/.app_screenshot.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/models/.build.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/app.rb +127 -51
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +15 -10
- data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +15 -11
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +13 -9
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +9 -7
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +15 -11
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_attachment.rb +7 -5
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +54 -36
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +21 -14
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/beta_app_review_submission.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/beta_group.rb +12 -2
- data/spaceship/lib/spaceship/connect_api/models/beta_tester.rb +12 -8
- data/spaceship/lib/spaceship/connect_api/models/build.rb +24 -16
- data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +9 -6
- data/spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +12 -8
- data/spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb +43 -0
- data/spaceship/lib/spaceship/connect_api/models/custom_app_user.rb +41 -0
- data/spaceship/lib/spaceship/connect_api/models/device.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +12 -8
- data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb +9 -6
- data/spaceship/lib/spaceship/connect_api/models/territory.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/models/user.rb +6 -4
- data/spaceship/lib/spaceship/connect_api/models/user_invitation.rb +9 -6
- data/spaceship/lib/spaceship/connect_api/spaceship.rb +7 -4
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +12 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +71 -0
- data/spaceship/lib/spaceship/tunes/iap_detail.rb +1 -1
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
- data/supply/lib/supply.rb +1 -1
- data/supply/lib/supply/options.rb +1 -1
- data/supply/lib/supply/uploader.rb +4 -3
- metadata +24 -20
- data/fastlane/lib/fastlane/actions/.register_device.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.register_devices.rb.swp +0 -0
@@ -29,7 +29,7 @@ class SocketClient: NSObject {
|
|
29
29
|
}
|
30
30
|
|
31
31
|
static let connectTimeoutSeconds = 2
|
32
|
-
static let defaultCommandTimeoutSeconds =
|
32
|
+
static let defaultCommandTimeoutSeconds = 10800 // 3 hours
|
33
33
|
static let doneToken = "done" // TODO: remove these
|
34
34
|
static let cancelToken = "cancelFastlaneRun"
|
35
35
|
|
@@ -22,7 +22,7 @@ module FastlaneCore
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def self.installed_identies(in_keychain: nil)
|
25
|
-
|
25
|
+
install_wwdr_certificates unless wwdr_certificates_installed?
|
26
26
|
|
27
27
|
available = list_available_identities(in_keychain: in_keychain)
|
28
28
|
# Match for this text against word boundaries to avoid edge cases around multiples of 10 identities!
|
@@ -81,16 +81,21 @@ module FastlaneCore
|
|
81
81
|
`#{commands.join(' ')}`
|
82
82
|
end
|
83
83
|
|
84
|
-
def self.
|
84
|
+
def self.wwdr_certificates_installed?
|
85
85
|
certificate_name = "Apple Worldwide Developer Relations Certification Authority"
|
86
86
|
keychain = wwdr_keychain
|
87
|
-
response = Helper.backticks("security find-certificate -c '#{certificate_name}' #{keychain.shellescape}", print: FastlaneCore::Globals.verbose?)
|
88
|
-
|
87
|
+
response = Helper.backticks("security find-certificate -a -c '#{certificate_name}' #{keychain.shellescape}", print: FastlaneCore::Globals.verbose?)
|
88
|
+
certs = response.split("keychain: \"#{keychain}\"").drop(1)
|
89
|
+
certs.count == 2
|
89
90
|
end
|
90
91
|
|
91
|
-
def self.
|
92
|
-
|
93
|
-
|
92
|
+
def self.install_wwdr_certificates
|
93
|
+
install_wwdr_certificate('https://developer.apple.com/certificationauthority/AppleWWDRCA.cer')
|
94
|
+
install_wwdr_certificate('https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer')
|
95
|
+
end
|
96
|
+
|
97
|
+
def self.install_wwdr_certificate(url)
|
98
|
+
file = Tempfile.new(File.basename(url))
|
94
99
|
filename = file.path
|
95
100
|
keychain = wwdr_keychain
|
96
101
|
keychain = "-k #{keychain.shellescape}" unless keychain.empty?
|
@@ -301,7 +301,7 @@ module FastlaneCore
|
|
301
301
|
Helper.backticks("open -a #{simulator_path} --args -CurrentDeviceUDID #{device.udid}", print: FastlaneCore::Globals.verbose?)
|
302
302
|
end
|
303
303
|
|
304
|
-
def copy_logs(device, log_identity, logs_destination_dir)
|
304
|
+
def copy_logs(device, log_identity, logs_destination_dir, log_collection_start_time)
|
305
305
|
logs_destination_dir = File.expand_path(logs_destination_dir)
|
306
306
|
os_version = FastlaneCore::CommandExecutor.execute(command: 'sw_vers -productVersion', print_all: false, print_command: false)
|
307
307
|
|
@@ -310,7 +310,7 @@ module FastlaneCore
|
|
310
310
|
|
311
311
|
are_logarchives_supported = device_supports_logarchives && host_computer_supports_logarchives
|
312
312
|
if are_logarchives_supported
|
313
|
-
copy_logarchive(device, log_identity, logs_destination_dir)
|
313
|
+
copy_logarchive(device, log_identity, logs_destination_dir, log_collection_start_time)
|
314
314
|
else
|
315
315
|
copy_logfile(device, log_identity, logs_destination_dir)
|
316
316
|
end
|
@@ -340,13 +340,17 @@ module FastlaneCore
|
|
340
340
|
UI.success("Copying file '#{logfile_src}' to '#{logfile_dst}'...")
|
341
341
|
end
|
342
342
|
|
343
|
-
def copy_logarchive(device, log_identity, logs_destination_dir)
|
343
|
+
def copy_logarchive(device, log_identity, logs_destination_dir, log_collection_start_time)
|
344
344
|
require 'shellwords'
|
345
345
|
|
346
346
|
logarchive_dst = File.join(logs_destination_dir, "system_logs-#{log_identity}.logarchive")
|
347
347
|
FileUtils.rm_rf(logarchive_dst)
|
348
348
|
FileUtils.mkdir_p(File.expand_path("..", logarchive_dst))
|
349
|
-
|
349
|
+
|
350
|
+
logs_collection_start = log_collection_start_time.strftime('%Y-%m-%d %H:%M:%S')
|
351
|
+
command = "xcrun simctl spawn #{device.udid} log collect "
|
352
|
+
command << "--start '#{logs_collection_start}' "
|
353
|
+
command << "--output #{logarchive_dst.shellescape} 2>/dev/null"
|
350
354
|
FastlaneCore::CommandExecutor.execute(command: command, print_all: false, print_command: true)
|
351
355
|
end
|
352
356
|
end
|
@@ -66,7 +66,7 @@ module FastlaneCore
|
|
66
66
|
|
67
67
|
# @return true if it is enabled to execute external commands
|
68
68
|
def self.sh_enabled?
|
69
|
-
!self.test?
|
69
|
+
!self.test? || ENV["FORCE_SH_DURING_TESTS"]
|
70
70
|
end
|
71
71
|
|
72
72
|
# @return [boolean] true if building in a known CI environment
|
@@ -107,7 +107,7 @@ module FastlaneCore
|
|
107
107
|
|
108
108
|
# Do we want to disable the colored output?
|
109
109
|
def self.colors_disabled?
|
110
|
-
FastlaneCore::Env.truthy?("FASTLANE_DISABLE_COLORS")
|
110
|
+
FastlaneCore::Env.truthy?("FASTLANE_DISABLE_COLORS") || ENV.key?("NO_COLOR")
|
111
111
|
end
|
112
112
|
|
113
113
|
# Does the user use the Mac stock terminal
|
@@ -203,9 +203,17 @@ module FastlaneCore
|
|
203
203
|
return File.join(self.itms_path, 'iTMSTransporter')
|
204
204
|
end
|
205
205
|
|
206
|
+
def self.user_defined_itms_path?
|
207
|
+
return FastlaneCore::Env.truthy?("FASTLANE_ITUNES_TRANSPORTER_PATH")
|
208
|
+
end
|
209
|
+
|
210
|
+
def self.user_defined_itms_path
|
211
|
+
return ENV["FASTLANE_ITUNES_TRANSPORTER_PATH"] if self.user_defined_itms_path?
|
212
|
+
end
|
213
|
+
|
206
214
|
# @return the full path to the iTMSTransporter executable
|
207
215
|
def self.itms_path
|
208
|
-
return
|
216
|
+
return self.user_defined_itms_path if FastlaneCore::Env.truthy?("FASTLANE_ITUNES_TRANSPORTER_PATH")
|
209
217
|
|
210
218
|
if self.mac?
|
211
219
|
# First check for manually install iTMSTransporter
|
@@ -254,7 +254,7 @@ module FastlaneCore
|
|
254
254
|
class JavaTransporterExecutor < TransporterExecutor
|
255
255
|
def build_upload_command(username, password, source = "/tmp", provider_short_name = "", jwt = nil)
|
256
256
|
use_jwt = !jwt.to_s.empty?
|
257
|
-
if Helper.mac? && Helper.xcode_at_least?(11)
|
257
|
+
if !Helper.user_defined_itms_path? && Helper.mac? && Helper.xcode_at_least?(11)
|
258
258
|
[
|
259
259
|
("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" unless use_jwt),
|
260
260
|
'xcrun iTMSTransporter',
|
@@ -294,7 +294,7 @@ module FastlaneCore
|
|
294
294
|
|
295
295
|
def build_download_command(username, password, apple_id, destination = "/tmp", provider_short_name = "", jwt = nil)
|
296
296
|
use_jwt = !jwt.to_s.empty?
|
297
|
-
if Helper.mac? && Helper.xcode_at_least?(11)
|
297
|
+
if !Helper.user_defined_itms_path? && Helper.mac? && Helper.xcode_at_least?(11)
|
298
298
|
[
|
299
299
|
("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" unless use_jwt),
|
300
300
|
'xcrun iTMSTransporter',
|
@@ -332,7 +332,7 @@ module FastlaneCore
|
|
332
332
|
|
333
333
|
def build_provider_ids_command(username, password, jwt = nil)
|
334
334
|
use_jwt = !jwt.to_s.empty?
|
335
|
-
if Helper.mac? && Helper.xcode_at_least?(11)
|
335
|
+
if !Helper.user_defined_itms_path? && Helper.mac? && Helper.xcode_at_least?(11)
|
336
336
|
[
|
337
337
|
("ITMS_TRANSPORTER_PASSWORD=#{password.shellescape}" unless use_jwt),
|
338
338
|
'xcrun iTMSTransporter',
|
@@ -39,7 +39,7 @@ module FastlaneCore
|
|
39
39
|
# See https://openradar.appspot.com/28524119
|
40
40
|
if Helper.backticks('security -h | grep set-key-partition-list', print: false).length > 0
|
41
41
|
command = "security set-key-partition-list"
|
42
|
-
command << " -S apple-tool:,apple:"
|
42
|
+
command << " -S apple-tool:,apple:,codesign:"
|
43
43
|
command << " -s" # This is a needed in Catalina to prevent "security: SecKeychainItemCopyAccess: A missing value was detected."
|
44
44
|
command << " -k #{keychain_password.to_s.shellescape}"
|
45
45
|
command << " #{keychain_path.shellescape}"
|
@@ -47,7 +47,9 @@ module FastlaneCore
|
|
47
47
|
def bundle_id(path, keychain_path = nil)
|
48
48
|
profile = parse(path, keychain_path)
|
49
49
|
app_id_prefix = profile["ApplicationIdentifierPrefix"].first
|
50
|
-
|
50
|
+
entitlements = profile["Entitlements"]
|
51
|
+
app_identifier = entitlements["application-identifier"] || entitlements["com.apple.application-identifier"]
|
52
|
+
bundle_id = app_identifier.gsub("#{app_id_prefix}.", "")
|
51
53
|
bundle_id
|
52
54
|
rescue
|
53
55
|
UI.error("Unable to extract the Bundle Id from the provided provisioning profile '#{path}'.")
|
@@ -142,7 +142,7 @@ module Gym
|
|
142
142
|
next unless specified_configuration == build_configuration.name
|
143
143
|
|
144
144
|
# Catalyst apps will have some build settings that will have a configuration
|
145
|
-
# that is
|
145
|
+
# that is specific for macos so going to do our best to capture those
|
146
146
|
#
|
147
147
|
# There are other platform filters besides "[sdk=macosx*]" that we could use but
|
148
148
|
# this is the default that Xcode will use so this will also be our default
|
data/match/lib/match/importer.rb
CHANGED
@@ -82,29 +82,41 @@ module Match
|
|
82
82
|
output_dir_certs = File.join(storage.prefixed_working_directory, "certs", cert_type.to_s)
|
83
83
|
output_dir_profiles = File.join(storage.prefixed_working_directory, "profiles", prov_type.to_s)
|
84
84
|
|
85
|
-
|
86
|
-
|
87
|
-
if
|
88
|
-
|
89
|
-
|
85
|
+
should_skip_certificate_matching = params[:skip_certificate_matching]
|
86
|
+
# In case there is no access to Apple Developer portal but we have the certificates, keys and profiles
|
87
|
+
if should_skip_certificate_matching
|
88
|
+
cert_name = File.basename(cert_path, ".*")
|
89
|
+
p12_name = File.basename(p12_path, ".*")
|
90
|
+
|
91
|
+
# Make dir if doesn't exist
|
92
|
+
FileUtils.mkdir_p(output_dir_certs)
|
93
|
+
dest_cert_path = File.join(output_dir_certs, "#{cert_name}.cer")
|
94
|
+
dest_p12_path = File.join(output_dir_certs, "#{p12_name}.p12")
|
90
95
|
else
|
91
|
-
|
92
|
-
|
96
|
+
# Need to get the cert id by comparing base64 encoded cert content with certificate content from the API responses
|
97
|
+
token = api_token(params)
|
98
|
+
if token
|
99
|
+
UI.message("Creating authorization token for App Store Connect API")
|
100
|
+
Spaceship::ConnectAPI.token = token
|
101
|
+
else
|
102
|
+
UI.message("Login to App Store Connect (#{params[:username]})")
|
103
|
+
Spaceship::ConnectAPI.login(params[:username], use_portal: true, use_tunes: false, portal_team_id: params[:team_id], team_name: params[:team_name])
|
104
|
+
end
|
105
|
+
certs = Spaceship::ConnectAPI::Certificate.all(filter: { certificateType: certificate_type })
|
106
|
+
|
107
|
+
# Base64 encode contents to find match from API to find a cert ID
|
108
|
+
cert_contents_base_64 = Base64.strict_encode64(File.binread(cert_path))
|
109
|
+
matching_cert = certs.find do |cert|
|
110
|
+
cert.certificate_content == cert_contents_base_64
|
111
|
+
end
|
112
|
+
|
113
|
+
UI.user_error!("This certificate cannot be imported - the certificate contents did not match with any available on the Developer Portal") if matching_cert.nil?
|
114
|
+
|
115
|
+
# Make dir if doesn't exist
|
116
|
+
FileUtils.mkdir_p(output_dir_certs)
|
117
|
+
dest_cert_path = File.join(output_dir_certs, "#{matching_cert.id}.cer")
|
118
|
+
dest_p12_path = File.join(output_dir_certs, "#{matching_cert.id}.p12")
|
93
119
|
end
|
94
|
-
certs = Spaceship::ConnectAPI::Certificate.all(filter: { certificateType: certificate_type })
|
95
|
-
|
96
|
-
# Base64 encode contents to find match from API to find a cert ID
|
97
|
-
cert_contents_base_64 = Base64.strict_encode64(File.binread(cert_path))
|
98
|
-
matching_cert = certs.find do |cert|
|
99
|
-
cert.certificate_content == cert_contents_base_64
|
100
|
-
end
|
101
|
-
|
102
|
-
UI.user_error!("This certificate cannot be imported - the certificate contents did not match with any available on the Developer Portal") if matching_cert.nil?
|
103
|
-
|
104
|
-
# Make dir if doesn't exist
|
105
|
-
FileUtils.mkdir_p(output_dir_certs)
|
106
|
-
dest_cert_path = File.join(output_dir_certs, "#{matching_cert.id}.cer")
|
107
|
-
dest_p12_path = File.join(output_dir_certs, "#{matching_cert.id}.p12")
|
108
120
|
|
109
121
|
files_to_commit = [dest_cert_path, dest_p12_path]
|
110
122
|
|
data/match/lib/match/module.rb
CHANGED
@@ -9,7 +9,7 @@ module Match
|
|
9
9
|
DESCRIPTION = "Easily sync your certificates and profiles across your team"
|
10
10
|
|
11
11
|
def self.environments
|
12
|
-
return %w(appstore adhoc development enterprise developer_id)
|
12
|
+
return %w(appstore adhoc development enterprise developer_id mac_installer_distribution)
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.storage_modes
|
data/match/lib/match/nuke.rb
CHANGED
@@ -252,11 +252,15 @@ module Match
|
|
252
252
|
|
253
253
|
self.encryption.encrypt_files if self.encryption
|
254
254
|
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
255
|
+
if files_to_delete.count > 0
|
256
|
+
# Now we need to save all this to the storage too, if needed
|
257
|
+
message = ["[fastlane]", "Nuked", "files", "for", type.to_s].join(" ")
|
258
|
+
self.storage.save_changes!(files_to_commit: [],
|
259
|
+
files_to_delete: files_to_delete,
|
260
|
+
custom_message: message)
|
261
|
+
else
|
262
|
+
UI.message("Your storage had no files to be deleted. This happens when you run `nuke` with an empty storage. Nothing to be worried about!")
|
263
|
+
end
|
260
264
|
end
|
261
265
|
|
262
266
|
private
|
data/match/lib/match/options.rb
CHANGED
@@ -65,7 +65,7 @@ module Match
|
|
65
65
|
FastlaneCore::ConfigItem.new(key: :app_identifier,
|
66
66
|
short_option: "-a",
|
67
67
|
env_name: "MATCH_APP_IDENTIFIER",
|
68
|
-
description: "The bundle identifier(s) of your app (comma-separated)",
|
68
|
+
description: "The bundle identifier(s) of your app (comma-separated string or array of strings)",
|
69
69
|
type: Array, # we actually allow String and Array here
|
70
70
|
skip_type_validation: true,
|
71
71
|
code_gen_sensitive: true,
|
@@ -227,7 +227,7 @@ module Match
|
|
227
227
|
short_option: "-p",
|
228
228
|
env_name: "MATCH_KEYCHAIN_PASSWORD",
|
229
229
|
sensitive: true,
|
230
|
-
description: "This might be required the first time you access certificates on a new mac. For the login/default keychain this is your account password",
|
230
|
+
description: "This might be required the first time you access certificates on a new mac. For the login/default keychain this is your macOS account password",
|
231
231
|
optional: true),
|
232
232
|
|
233
233
|
# settings
|
@@ -283,6 +283,12 @@ module Match
|
|
283
283
|
optional: true,
|
284
284
|
type: Boolean,
|
285
285
|
default_value: false),
|
286
|
+
FastlaneCore::ConfigItem.new(key: :skip_certificate_matching,
|
287
|
+
env_name: "MATCH_SKIP_CERTIFICATE_MATCHING",
|
288
|
+
description: "Set to true if there is no access to Apple developer portal but there are certificates, keys and profiles provided. Only works with match import action",
|
289
|
+
optional: true,
|
290
|
+
type: Boolean,
|
291
|
+
default_value: false),
|
286
292
|
FastlaneCore::ConfigItem.new(key: :output_path,
|
287
293
|
env_name: "MATCH_OUTPUT_PATH",
|
288
294
|
description: "Path in which to export certificates, key and profile",
|
@@ -192,7 +192,7 @@ module Pilot
|
|
192
192
|
[
|
193
193
|
build.app_version,
|
194
194
|
build.version,
|
195
|
-
(build.beta_build_metrics || []).map(&:install_count).reduce(:+)
|
195
|
+
(build.beta_build_metrics || []).map(&:install_count).compact.reduce(:+)
|
196
196
|
]
|
197
197
|
end
|
198
198
|
|
@@ -273,9 +273,15 @@ module Pilot
|
|
273
273
|
changelog
|
274
274
|
end
|
275
275
|
|
276
|
+
def self.emoji_regex
|
277
|
+
# EmojiRegex::RGIEmoji is now preferred over EmojiRegex::Regex which is deprecated as of 3.2.0
|
278
|
+
# https://github.com/ticky/ruby-emoji-regex/releases/tag/v3.2.0
|
279
|
+
return defined?(EmojiRegex::RGIEmoji) ? EmojiRegex::RGIEmoji : EmojiRegex::Regex
|
280
|
+
end
|
281
|
+
|
276
282
|
def self.strip_emoji(changelog)
|
277
|
-
if changelog && changelog =~
|
278
|
-
changelog.gsub!(
|
283
|
+
if changelog && changelog =~ emoji_regex
|
284
|
+
changelog.gsub!(emoji_regex, "")
|
279
285
|
UI.important("Emoji symbols have been removed from the changelog, since they're not allowed by Apple.")
|
280
286
|
end
|
281
287
|
changelog
|
@@ -187,15 +187,12 @@ module Scan
|
|
187
187
|
end
|
188
188
|
end
|
189
189
|
|
190
|
+
# Convert array to lazy enumerable (evaluate map only when needed)
|
190
191
|
# grab the first unempty evaluated array
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
}.reject(&:nil?).first
|
196
|
-
else
|
197
|
-
Scan.devices = []
|
198
|
-
end
|
192
|
+
Scan.devices = [matches, default].lazy.reject(&:nil?).map { |x|
|
193
|
+
arr = x.call
|
194
|
+
arr unless arr.empty?
|
195
|
+
}.reject(&:nil?).first
|
199
196
|
end
|
200
197
|
|
201
198
|
def self.min_xcode8?
|
@@ -212,7 +209,9 @@ module Scan
|
|
212
209
|
end
|
213
210
|
|
214
211
|
# building up the destination now
|
215
|
-
if Scan.
|
212
|
+
if Scan.building_mac_catalyst_for_mac?
|
213
|
+
Scan.config[:destination] = ["platform=macOS,variant=Mac Catalyst"]
|
214
|
+
elsif Scan.devices && Scan.devices.count > 0
|
216
215
|
Scan.config[:destination] = Scan.devices.map { |d| "platform=#{d.os_type} Simulator,id=#{d.udid}" }
|
217
216
|
elsif Scan.project.mac_app?
|
218
217
|
Scan.config[:destination] = min_xcode8? ? ["platform=macOS"] : ["platform=OS X"]
|
data/scan/lib/scan/module.rb
CHANGED
@@ -21,6 +21,10 @@ module Scan
|
|
21
21
|
def scanfile_name
|
22
22
|
"Scanfile"
|
23
23
|
end
|
24
|
+
|
25
|
+
def building_mac_catalyst_for_mac?
|
26
|
+
Scan.project.supports_mac_catalyst? && Scan.config[:catalyst_platform] == "macos"
|
27
|
+
end
|
24
28
|
end
|
25
29
|
|
26
30
|
Helper = FastlaneCore::Helper # you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore
|
data/scan/lib/scan/options.rb
CHANGED
@@ -419,6 +419,15 @@ module Scan
|
|
419
419
|
description: "Use only if you're a pro, use the other options instead",
|
420
420
|
is_string: false,
|
421
421
|
optional: true),
|
422
|
+
FastlaneCore::ConfigItem.new(key: :catalyst_platform,
|
423
|
+
env_name: "SCAN_CATALYST_PLATFORM",
|
424
|
+
description: "Platform to build when using a Catalyst enabled app. Valid values are: ios, macos",
|
425
|
+
type: String,
|
426
|
+
optional: true,
|
427
|
+
verify_block: proc do |value|
|
428
|
+
av = %w(ios macos)
|
429
|
+
UI.user_error!("Unsupported export_method '#{value}', must be: #{av}") unless av.include?(value)
|
430
|
+
end),
|
422
431
|
FastlaneCore::ConfigItem.new(key: :custom_report_file_name,
|
423
432
|
env_name: "SCAN_CUSTOM_REPORT_FILE_NAME",
|
424
433
|
description: "Sets custom full report file name when generating a single report",
|
data/scan/lib/scan/runner.rb
CHANGED
@@ -16,6 +16,7 @@ module Scan
|
|
16
16
|
class Runner
|
17
17
|
def initialize
|
18
18
|
@test_command_generator = TestCommandGenerator.new
|
19
|
+
@device_boot_datetime = DateTime.now
|
19
20
|
end
|
20
21
|
|
21
22
|
def run
|
@@ -82,6 +83,8 @@ module Scan
|
|
82
83
|
end
|
83
84
|
|
84
85
|
def handle_results(tests_exit_status)
|
86
|
+
return if Scan.config[:disable_xcpretty]
|
87
|
+
|
85
88
|
result = TestResultParser.new.parse_result(test_results)
|
86
89
|
SlackPoster.new.run(result)
|
87
90
|
|
@@ -143,8 +146,6 @@ module Scan
|
|
143
146
|
end
|
144
147
|
|
145
148
|
def test_results
|
146
|
-
return if Scan.config[:disable_xcpretty]
|
147
|
-
|
148
149
|
temp_junit_report = Scan.cache[:temp_junit_report]
|
149
150
|
return File.read(temp_junit_report) if temp_junit_report && File.file?(temp_junit_report)
|
150
151
|
|
@@ -184,7 +185,7 @@ module Scan
|
|
184
185
|
UI.header("Collecting system logs")
|
185
186
|
Scan.devices.each do |device|
|
186
187
|
log_identity = "#{device.name}_#{device.os_type}_#{device.os_version}"
|
187
|
-
FastlaneCore::Simulator.copy_logs(device, log_identity, Scan.config[:output_directory])
|
188
|
+
FastlaneCore::Simulator.copy_logs(device, log_identity, Scan.config[:output_directory], @device_boot_datetime)
|
188
189
|
end
|
189
190
|
end
|
190
191
|
|
data/sigh/lib/assets/resign.sh
CHANGED
@@ -535,7 +535,7 @@ function resign {
|
|
535
535
|
fi
|
536
536
|
|
537
537
|
# Check for and resign OnDemandResource folders
|
538
|
-
ODR_DIR="$(dirname $APP_PATH)/OnDemandResources"
|
538
|
+
ODR_DIR="$(dirname "$APP_PATH")/OnDemandResources"
|
539
539
|
if [ -d "$ODR_DIR" ]; then
|
540
540
|
for assetpack in "$ODR_DIR"/*
|
541
541
|
do
|