fastlane 2.207.0 → 2.209.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +94 -94
- data/deliver/lib/deliver/options.rb +1 -2
- data/fastlane/lib/assets/AppfileTemplate +1 -1
- data/fastlane/lib/assets/AppfileTemplate.swift +1 -1
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +1 -1
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/import_certificate.rb +1 -1
- data/fastlane/lib/fastlane/actions/pod_push.rb +19 -1
- data/fastlane/lib/fastlane/setup/setup_ios.rb +1 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Appfile.swift +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +2 -2
- data/fastlane/swift/Fastlane.swift +18 -10
- 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/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 +2 -2
- data/fastlane/swift/formatting/Brewfile.lock.json +16 -16
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +68 -13
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -0
- data/frameit/lib/frameit/frame_downloader.rb +1 -1
- data/match/lib/match/runner.rb +6 -0
- data/match/lib/match/setup.rb +1 -1
- data/match/lib/match/storage/gitlab/client.rb +17 -1
- data/match/lib/match/storage/gitlab/secure_file.rb +1 -2
- data/match/lib/match/storage/gitlab_secure_files.rb +5 -2
- data/match/lib/match/table_printer.rb +2 -1
- data/match/lib/match/utils.rb +15 -2
- data/pilot/lib/pilot/build_manager.rb +2 -2
- data/snapshot/lib/snapshot/options.rb +1 -1
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +4 -1
- data/spaceship/lib/spaceship/connect_api/response.rb +10 -6
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +63 -2
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +1 -1
- data/trainer/lib/trainer/junit_generator.rb +1 -1
- metadata +22 -34
- data/fastlane/lib/.DS_Store +0 -0
- data/fastlane/lib/fastlane/.DS_Store +0 -0
- data/fastlane/lib/fastlane/actions/.DS_Store +0 -0
- data/fastlane/lib/fastlane/actions/.supply.rb.swp +0 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/joshholtz.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/match/lib/match/.module.rb.swp +0 -0
- data/match/lib/match/.nuke.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/.response.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/models/.app.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/models/.review_submission.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/testflight/.testflight.rb.swp +0 -0
- data/trainer/lib/.DS_Store +0 -0
@@ -53,7 +53,7 @@ public protocol SnapshotfileProtocol: AnyObject {
|
|
53
53
|
/// Enabling this option will automatically override the status bar to show 9:41 AM, full battery, and full reception (Adjust 'SNAPSHOT_SIMULATOR_WAIT_FOR_BOOT_TIMEOUT' environment variable if override status bar is not working. Might be because simulator is not fully booted. Defaults to 10 seconds)
|
54
54
|
var overrideStatusBar: Bool { get }
|
55
55
|
|
56
|
-
/// Fully customize the status bar by setting each option here. See `xcrun simctl status_bar --help`
|
56
|
+
/// Fully customize the status bar by setting each option here. Requires `override_status_bar` to be set to `true`. See `xcrun simctl status_bar --help`
|
57
57
|
var overrideStatusBarArguments: String? { get }
|
58
58
|
|
59
59
|
/// Enabling this option will configure the Simulator's system language
|
@@ -204,4 +204,4 @@ public extension SnapshotfileProtocol {
|
|
204
204
|
|
205
205
|
// Please don't remove the lines below
|
206
206
|
// They are used to detect outdated files
|
207
|
-
// FastlaneRunnerAPIVersion [0.9.
|
207
|
+
// FastlaneRunnerAPIVersion [0.9.101]
|
@@ -2,40 +2,40 @@
|
|
2
2
|
"entries": {
|
3
3
|
"brew": {
|
4
4
|
"swiftformat": {
|
5
|
-
"version": "0.49.
|
5
|
+
"version": "0.49.17",
|
6
6
|
"bottle": {
|
7
7
|
"rebuild": 0,
|
8
8
|
"root_url": "https://ghcr.io/v2/homebrew/core",
|
9
9
|
"files": {
|
10
10
|
"arm64_monterey": {
|
11
11
|
"cellar": ":any_skip_relocation",
|
12
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
13
|
-
"sha256": "
|
12
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:4b7f2dbc6e2d69c55e556339fd37bcb9b5085ffb26e18ece57f6614f68f71d9a",
|
13
|
+
"sha256": "4b7f2dbc6e2d69c55e556339fd37bcb9b5085ffb26e18ece57f6614f68f71d9a"
|
14
14
|
},
|
15
15
|
"arm64_big_sur": {
|
16
16
|
"cellar": ":any_skip_relocation",
|
17
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
18
|
-
"sha256": "
|
17
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:6762a1f50c474ace807cbe505c40ec83e07d95f3a709b862b55a4aee358bcbc2",
|
18
|
+
"sha256": "6762a1f50c474ace807cbe505c40ec83e07d95f3a709b862b55a4aee358bcbc2"
|
19
19
|
},
|
20
20
|
"monterey": {
|
21
21
|
"cellar": ":any_skip_relocation",
|
22
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
23
|
-
"sha256": "
|
22
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:46ab8382cc299980caf2aa48ca4e08cf3b3052432959e2bd02ca190f168f563b",
|
23
|
+
"sha256": "46ab8382cc299980caf2aa48ca4e08cf3b3052432959e2bd02ca190f168f563b"
|
24
24
|
},
|
25
25
|
"big_sur": {
|
26
26
|
"cellar": ":any_skip_relocation",
|
27
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
28
|
-
"sha256": "
|
27
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:0145b1f25c402c6d3f4b022a1ec3fc1469b3d61428bc9f47405e2124cffda100",
|
28
|
+
"sha256": "0145b1f25c402c6d3f4b022a1ec3fc1469b3d61428bc9f47405e2124cffda100"
|
29
29
|
},
|
30
30
|
"catalina": {
|
31
31
|
"cellar": ":any_skip_relocation",
|
32
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
33
|
-
"sha256": "
|
32
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:bc210385a7a34bd8babd475927d698e38feb6d9b6bc267f159acd67e90542380",
|
33
|
+
"sha256": "bc210385a7a34bd8babd475927d698e38feb6d9b6bc267f159acd67e90542380"
|
34
34
|
},
|
35
35
|
"x86_64_linux": {
|
36
36
|
"cellar": "/home/linuxbrew/.linuxbrew/Cellar",
|
37
|
-
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:
|
38
|
-
"sha256": "
|
37
|
+
"url": "https://ghcr.io/v2/homebrew/core/swiftformat/blobs/sha256:326c9a8cedeeb429315d94638a5c03a764194b346a2781fe858d5cb83d93662d",
|
38
|
+
"sha256": "326c9a8cedeeb429315d94638a5c03a764194b346a2781fe858d5cb83d93662d"
|
39
39
|
}
|
40
40
|
}
|
41
41
|
}
|
@@ -61,12 +61,12 @@
|
|
61
61
|
"macOS": "11.0.1"
|
62
62
|
},
|
63
63
|
"monterey": {
|
64
|
-
"HOMEBREW_VERSION": "3.5.
|
64
|
+
"HOMEBREW_VERSION": "3.5.9",
|
65
65
|
"HOMEBREW_PREFIX": "/opt/homebrew",
|
66
|
-
"Homebrew/homebrew-core": "
|
66
|
+
"Homebrew/homebrew-core": "191ec7ef868ea58e6d7305d756516e5d69c2568c",
|
67
67
|
"CLT": "13.4.0.0.1.1651278267",
|
68
68
|
"Xcode": "13.4.1",
|
69
|
-
"macOS": "12.
|
69
|
+
"macOS": "12.5"
|
70
70
|
}
|
71
71
|
}
|
72
72
|
}
|
@@ -3,6 +3,40 @@ require 'openssl'
|
|
3
3
|
|
4
4
|
require_relative 'helper'
|
5
5
|
|
6
|
+
# WWDR Intermediate Certificates in https://www.apple.com/certificateauthority/
|
7
|
+
WWDRCA_CERTIFICATES = [
|
8
|
+
{
|
9
|
+
alias: 'G1',
|
10
|
+
sha256: 'ce057691d730f89ca25e916f7335f4c8a15713dcd273a658c024023f8eb809c2',
|
11
|
+
url: 'https://developer.apple.com/certificationauthority/AppleWWDRCA.cer'
|
12
|
+
},
|
13
|
+
{
|
14
|
+
alias: 'G2',
|
15
|
+
sha256: '9ed4b3b88c6a339cf1387895bda9ca6ea31a6b5ce9edf7511845923b0c8ac94c',
|
16
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG2.cer'
|
17
|
+
},
|
18
|
+
{
|
19
|
+
alias: 'G3',
|
20
|
+
sha256: 'dcf21878c77f4198e4b4614f03d696d89c66c66008d4244e1b99161aac91601f',
|
21
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer'
|
22
|
+
},
|
23
|
+
{
|
24
|
+
alias: 'G4',
|
25
|
+
sha256: 'ea4757885538dd8cb59ff4556f676087d83c85e70902c122e42c0808b5bce14c',
|
26
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG4.cer'
|
27
|
+
},
|
28
|
+
{
|
29
|
+
alias: 'G5',
|
30
|
+
sha256: '53fd008278e5a595fe1e908ae9c5e5675f26243264a5a6438c023e3ce2870760',
|
31
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG5.cer'
|
32
|
+
},
|
33
|
+
{
|
34
|
+
alias: 'G6',
|
35
|
+
sha256: 'bdd4ed6e74691f0c2bfd01be0296197af1379e0418e2d300efa9c3bef642ca30',
|
36
|
+
url: 'https://www.apple.com/certificateauthority/AppleWWDRCAG6.cer'
|
37
|
+
}
|
38
|
+
]
|
39
|
+
|
6
40
|
module FastlaneCore
|
7
41
|
# This class checks if a specific certificate is installed on the current mac
|
8
42
|
class CertChecker
|
@@ -22,7 +56,7 @@ module FastlaneCore
|
|
22
56
|
end
|
23
57
|
|
24
58
|
def self.installed_identies(in_keychain: nil)
|
25
|
-
|
59
|
+
install_missing_wwdr_certificates
|
26
60
|
|
27
61
|
available = list_available_identities(in_keychain: in_keychain)
|
28
62
|
# Match for this text against word boundaries to avoid edge cases around multiples of 10 identities!
|
@@ -81,20 +115,41 @@ module FastlaneCore
|
|
81
115
|
`#{commands.join(' ')}`
|
82
116
|
end
|
83
117
|
|
84
|
-
def self.
|
85
|
-
certificate_name = "Apple Worldwide Developer Relations
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
118
|
+
def self.installed_wwdr_certificates
|
119
|
+
certificate_name = "Apple Worldwide Developer Relations"
|
120
|
+
|
121
|
+
# Find all installed WWDRCA certificates
|
122
|
+
installed_certs = []
|
123
|
+
Helper.backticks("security find-certificate -a -c '#{certificate_name}' -p #{wwdr_keychain.shellescape}")
|
124
|
+
.lines
|
125
|
+
.each do |line|
|
126
|
+
if line.start_with?('-----BEGIN CERTIFICATE-----')
|
127
|
+
installed_certs << line
|
128
|
+
else
|
129
|
+
installed_certs.last << line
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
# Get the alias (see `WWDRCA_CERTIFICATES`) of the installed WWDRCA certificates
|
134
|
+
installed_certs
|
135
|
+
.map do |pem|
|
136
|
+
sha256 = Digest::SHA256.hexdigest(OpenSSL::X509::Certificate.new(pem).to_der)
|
137
|
+
WWDRCA_CERTIFICATES.find { |c| c[:sha256].casecmp?(sha256) }&.fetch(:alias)
|
138
|
+
end
|
139
|
+
.compact
|
90
140
|
end
|
91
141
|
|
92
|
-
def self.
|
93
|
-
|
94
|
-
|
142
|
+
def self.install_missing_wwdr_certificates
|
143
|
+
# Install all Worldwide Developer Relations Intermediate Certificates listed here: https://www.apple.com/certificateauthority/
|
144
|
+
missing = WWDRCA_CERTIFICATES.map { |c| c[:alias] } - installed_wwdr_certificates
|
145
|
+
missing.each do |cert_alias|
|
146
|
+
install_wwdr_certificate(cert_alias)
|
147
|
+
end
|
148
|
+
missing.count
|
95
149
|
end
|
96
150
|
|
97
|
-
def self.install_wwdr_certificate(
|
151
|
+
def self.install_wwdr_certificate(cert_alias)
|
152
|
+
url = WWDRCA_CERTIFICATES.find { |c| c[:alias] == cert_alias }.fetch(:url)
|
98
153
|
file = Tempfile.new(File.basename(url))
|
99
154
|
filename = file.path
|
100
155
|
keychain = wwdr_keychain
|
@@ -124,8 +179,8 @@ module FastlaneCore
|
|
124
179
|
|
125
180
|
def self.wwdr_keychain
|
126
181
|
priority = [
|
127
|
-
"security
|
128
|
-
"security
|
182
|
+
"security default-keychain -d user",
|
183
|
+
"security list-keychains -d user"
|
129
184
|
]
|
130
185
|
priority.each do |command|
|
131
186
|
keychains = Helper.backticks(command, print: FastlaneCore::Globals.verbose?).split("\n")
|
@@ -14,6 +14,7 @@ module FastlaneCore
|
|
14
14
|
command << " -T /usr/bin/codesign" # to not be asked for permission when running a tool like `gym` (before Sierra)
|
15
15
|
command << " -T /usr/bin/security"
|
16
16
|
command << " -T /usr/bin/productbuild" # to not be asked for permission when using an installer cert for macOS
|
17
|
+
command << " -T /usr/bin/productsign" # to not be asked for permission when using an installer cert for macOS
|
17
18
|
command << " 1> /dev/null" unless output
|
18
19
|
|
19
20
|
sensitive_command = command.gsub(password_part, " -P ********")
|
@@ -53,7 +53,7 @@ module Frameit
|
|
53
53
|
|
54
54
|
def print_disclaimer
|
55
55
|
UI.header("Device frames disclaimer")
|
56
|
-
UI.important("All used device frames are available via Facebook Design:
|
56
|
+
UI.important("All used device frames are available via Facebook Design: https://design.facebook.com/toolsandresources/devices/")
|
57
57
|
UI.message("----------------------------------------")
|
58
58
|
UI.message("While Facebook has redrawn and shares these assets for the benefit")
|
59
59
|
UI.message("of the design community, Facebook does not own any of the underlying")
|
data/match/lib/match/runner.rb
CHANGED
@@ -309,6 +309,12 @@ module Match
|
|
309
309
|
platform: params[:platform]),
|
310
310
|
parsed["TeamIdentifier"].first)
|
311
311
|
|
312
|
+
cert_info = Utils.get_cert_info(parsed["DeveloperCertificates"].first.string).to_h
|
313
|
+
Utils.fill_environment(Utils.environment_variable_name_certificate_name(app_identifier: app_identifier,
|
314
|
+
type: prov_type,
|
315
|
+
platform: params[:platform]),
|
316
|
+
cert_info["Common Name"])
|
317
|
+
|
312
318
|
Utils.fill_environment(Utils.environment_variable_name_profile_name(app_identifier: app_identifier,
|
313
319
|
type: prov_type,
|
314
320
|
platform: params[:platform]),
|
data/match/lib/match/setup.rb
CHANGED
@@ -69,7 +69,23 @@ module Match
|
|
69
69
|
"name" => target_file
|
70
70
|
)
|
71
71
|
|
72
|
-
execute_request(url, request)
|
72
|
+
response = execute_request(url, request)
|
73
|
+
|
74
|
+
log_upload_error(response, target_file) if response.code != "201"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def log_upload_error(response, target_file)
|
79
|
+
begin
|
80
|
+
response_body = JSON.parse(response.body)
|
81
|
+
rescue JSON::ParserError
|
82
|
+
response_body = response.body
|
83
|
+
end
|
84
|
+
|
85
|
+
if response_body["message"] && (response_body["message"]["name"] == ["has already been taken"])
|
86
|
+
UI.error("#{target_file} already exists in GitLab project #{@project_id}, file not uploaded")
|
87
|
+
else
|
88
|
+
UI.error("Upload error for #{target_file}: #{response_body}")
|
73
89
|
end
|
74
90
|
end
|
75
91
|
|
@@ -43,8 +43,7 @@ module Match
|
|
43
43
|
saved_file.write(data.read)
|
44
44
|
end
|
45
45
|
|
46
|
-
|
47
|
-
FileUtils.chmod('u=r,go-r', destination_file)
|
46
|
+
FileUtils.chmod('u=rw,go-r', destination_file)
|
48
47
|
end
|
49
48
|
|
50
49
|
UI.crash!("Checksum validation failed for #{@file.name}") unless valid_checksum?(destination_file)
|
@@ -15,6 +15,7 @@ module Match
|
|
15
15
|
# Store the code signing identities in GitLab Secure Files
|
16
16
|
class GitLabSecureFiles < Interface
|
17
17
|
attr_reader :gitlab_client
|
18
|
+
attr_reader :project_id
|
18
19
|
attr_reader :readonly
|
19
20
|
attr_reader :username
|
20
21
|
attr_reader :team_id
|
@@ -161,7 +162,7 @@ module Match
|
|
161
162
|
end
|
162
163
|
|
163
164
|
def skip_docs
|
164
|
-
|
165
|
+
true
|
165
166
|
end
|
166
167
|
|
167
168
|
def list_files(file_name: "", file_ext: "")
|
@@ -172,7 +173,9 @@ module Match
|
|
172
173
|
# This method must return the content of the Matchfile
|
173
174
|
# that should be generated
|
174
175
|
def generate_matchfile_content(template: nil)
|
175
|
-
|
176
|
+
project = UI.input("What is your GitLab Project (i.e. gitlab-org/gitlab): ")
|
177
|
+
|
178
|
+
return "gitlab_project(\"#{project}\")"
|
176
179
|
end
|
177
180
|
end
|
178
181
|
end
|
@@ -33,7 +33,8 @@ module Match
|
|
33
33
|
Utils.environment_variable_name(app_identifier: app_identifier, type: type, platform: platform) => "Profile UUID",
|
34
34
|
Utils.environment_variable_name_profile_name(app_identifier: app_identifier, type: type, platform: platform) => "Profile Name",
|
35
35
|
Utils.environment_variable_name_profile_path(app_identifier: app_identifier, type: type, platform: platform) => "Profile Path",
|
36
|
-
Utils.environment_variable_name_team_id(app_identifier: app_identifier, type: type, platform: platform) => "Development Team ID"
|
36
|
+
Utils.environment_variable_name_team_id(app_identifier: app_identifier, type: type, platform: platform) => "Development Team ID",
|
37
|
+
Utils.environment_variable_name_certificate_name(app_identifier: app_identifier, type: type, platform: platform) => "Certificate Name"
|
37
38
|
}.each do |env_key, name|
|
38
39
|
rows << [name, env_key, ENV[env_key]]
|
39
40
|
end
|
data/match/lib/match/utils.rb
CHANGED
@@ -31,8 +31,21 @@ module Match
|
|
31
31
|
(base_environment_variable_name(app_identifier: app_identifier, type: type, platform: platform) + ["profile-path"]).join("_")
|
32
32
|
end
|
33
33
|
|
34
|
-
def self.
|
35
|
-
|
34
|
+
def self.environment_variable_name_certificate_name(app_identifier: nil, type: nil, platform: :ios)
|
35
|
+
(base_environment_variable_name(app_identifier: app_identifier, type: type, platform: platform) + ["certificate-name"]).join("_")
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.get_cert_info(cer_certificate)
|
39
|
+
# can receive a certificate path or the file data
|
40
|
+
begin
|
41
|
+
if File.exist?(cer_certificate)
|
42
|
+
cer_certificate = File.binread(cer_certificate)
|
43
|
+
end
|
44
|
+
rescue ArgumentError
|
45
|
+
# cert strings have null bytes; suppressing output
|
46
|
+
end
|
47
|
+
|
48
|
+
cert = OpenSSL::X509::Certificate.new(cer_certificate)
|
36
49
|
|
37
50
|
# openssl output:
|
38
51
|
# subject= /UID={User ID}/CN={Certificate Name}/OU={Certificate User}/O={Organisation}/C={Country}
|
@@ -108,10 +108,10 @@ module Pilot
|
|
108
108
|
|
109
109
|
def wait_for_build_processing_to_be_complete(return_when_build_appears = false)
|
110
110
|
platform = fetch_app_platform
|
111
|
-
if config[:ipa] && platform != "osx"
|
111
|
+
if config[:ipa] && platform != "osx" && !config[:distribute_only]
|
112
112
|
app_version = FastlaneCore::IpaFileAnalyser.fetch_app_version(config[:ipa])
|
113
113
|
app_build = FastlaneCore::IpaFileAnalyser.fetch_app_build(config[:ipa])
|
114
|
-
elsif config[:pkg]
|
114
|
+
elsif config[:pkg] && !config[:distribute_only]
|
115
115
|
app_version = FastlaneCore::PkgFileAnalyser.fetch_app_version(config[:pkg])
|
116
116
|
app_build = FastlaneCore::PkgFileAnalyser.fetch_app_build(config[:pkg])
|
117
117
|
else
|
@@ -133,7 +133,7 @@ module Snapshot
|
|
133
133
|
is_string: false),
|
134
134
|
FastlaneCore::ConfigItem.new(key: :override_status_bar_arguments,
|
135
135
|
env_name: 'SNAPSHOT_OVERRIDE_STATUS_BAR_ARGUMENTS',
|
136
|
-
description: "Fully customize the status bar by setting each option here. See `xcrun simctl status_bar --help`",
|
136
|
+
description: "Fully customize the status bar by setting each option here. Requires `override_status_bar` to be set to `true`. See `xcrun simctl status_bar --help`",
|
137
137
|
optional: true,
|
138
138
|
type: String),
|
139
139
|
FastlaneCore::ConfigItem.new(key: :localize_simulator,
|
@@ -135,7 +135,10 @@ module Snapshot
|
|
135
135
|
if arguments.nil? || arguments.empty?
|
136
136
|
# The time needs to be passed as ISO8601 so the simulator formats it correctly
|
137
137
|
time = Time.new(2007, 1, 9, 9, 41, 0)
|
138
|
-
|
138
|
+
|
139
|
+
# If you don't override the operator name, you'll get "Carrier" in the status bar on no-notch devices such as iPhone 8. Pass an empty string to blank it out.
|
140
|
+
|
141
|
+
arguments = "--time #{time.iso8601} --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --operatorName '' --cellularBars 4 --batteryState charged --batteryLevel 100"
|
139
142
|
end
|
140
143
|
|
141
144
|
Helper.backticks("xcrun simctl status_bar #{device_udid} override #{arguments} &> /dev/null")
|
@@ -22,13 +22,17 @@ module Spaceship
|
|
22
22
|
return links["next"]
|
23
23
|
end
|
24
24
|
|
25
|
-
def next_page
|
25
|
+
def next_page(&block)
|
26
26
|
url = next_url
|
27
27
|
return nil if url.nil?
|
28
|
-
|
28
|
+
if block_given?
|
29
|
+
return yield(url)
|
30
|
+
else
|
31
|
+
return client.get(url)
|
32
|
+
end
|
29
33
|
end
|
30
34
|
|
31
|
-
def next_pages(count: 1)
|
35
|
+
def next_pages(count: 1, &block)
|
32
36
|
if !count.nil? && count < 0
|
33
37
|
count = 0
|
34
38
|
end
|
@@ -38,7 +42,7 @@ module Spaceship
|
|
38
42
|
|
39
43
|
resp = self
|
40
44
|
loop do
|
41
|
-
resp = resp.next_page
|
45
|
+
resp = resp.next_page(&block)
|
42
46
|
break if resp.nil?
|
43
47
|
responses << resp
|
44
48
|
counter += 1
|
@@ -49,8 +53,8 @@ module Spaceship
|
|
49
53
|
return responses
|
50
54
|
end
|
51
55
|
|
52
|
-
def all_pages
|
53
|
-
return next_pages(count: nil)
|
56
|
+
def all_pages(&block)
|
57
|
+
return next_pages(count: nil, &block)
|
54
58
|
end
|
55
59
|
|
56
60
|
def to_models
|
@@ -9,6 +9,7 @@ require_relative 'errors'
|
|
9
9
|
require_relative 'iap_subscription_pricing_tier'
|
10
10
|
require_relative 'pricing_tier'
|
11
11
|
require_relative 'territory'
|
12
|
+
require_relative '../connect_api/response'
|
12
13
|
module Spaceship
|
13
14
|
# rubocop:disable Metrics/ClassLength
|
14
15
|
class TunesClient < Spaceship::Client
|
@@ -254,8 +255,68 @@ module Spaceship
|
|
254
255
|
#####################################################
|
255
256
|
|
256
257
|
def applications
|
257
|
-
|
258
|
-
|
258
|
+
# Doing this real bad puts for now until a more formal deprecation logic can get made
|
259
|
+
puts("Spaceship::Tunes::Application.all is deprecated")
|
260
|
+
puts(" It's using a temporary patch to keep it from raising an error but things may not work correctly")
|
261
|
+
puts(" Please consider switching to Spaceship::ConnectAPI if you can")
|
262
|
+
puts(" For more details - https://github.com/fastlane/fastlane/pull/20480")
|
263
|
+
|
264
|
+
# This legacy endpoint went offline around July 7th, 2022. This is a rough attempt
|
265
|
+
# at retrofitting using the newer App Store Connect API endpoints
|
266
|
+
#
|
267
|
+
# This could all be done easily with Spaceship::ConnectAPI::App.find but there were a lot of
|
268
|
+
# circular dependency issues that were very difficult to solve because. Spaceship::Tunes would be
|
269
|
+
# using Spaceship::ConnectAPI which uses Spaceship::Tunes
|
270
|
+
#
|
271
|
+
# However, using Spaceship::ConnectAPI::Response works. This will fetch multiple pages of app
|
272
|
+
# if it needs to
|
273
|
+
#
|
274
|
+
# https://github.com/fastlane/fastlane/pull/20480
|
275
|
+
r = request(:get, "https://appstoreconnect.apple.com/iris/v1/apps?include=appStoreVersions,prices")
|
276
|
+
response = Spaceship::ConnectAPI::Response.new(
|
277
|
+
body: r.body,
|
278
|
+
status: r.status,
|
279
|
+
headers: r.headers,
|
280
|
+
client: nil
|
281
|
+
)
|
282
|
+
|
283
|
+
apps = response.all_pages do |url|
|
284
|
+
r = request(:get, url)
|
285
|
+
Spaceship::ConnectAPI::Response.new(
|
286
|
+
body: r.body,
|
287
|
+
status: r.status,
|
288
|
+
headers: r.headers,
|
289
|
+
client: nil
|
290
|
+
)
|
291
|
+
end.flat_map(&:to_models)
|
292
|
+
|
293
|
+
apps.map do |asc_app|
|
294
|
+
platforms = (asc_app.app_store_versions || []).map(&:platform).uniq.map do |asc_platform|
|
295
|
+
case asc_platform
|
296
|
+
when "TV_OS"
|
297
|
+
"appletvos"
|
298
|
+
when "MAC_OS"
|
299
|
+
"osx"
|
300
|
+
when "IOS"
|
301
|
+
"ios"
|
302
|
+
else
|
303
|
+
raise "Cannot find a matching platform for '#{asc_platform}'}"
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
307
|
+
{
|
308
|
+
'adamId' => asc_app.id,
|
309
|
+
'name' => asc_app.name,
|
310
|
+
'vendorId' => "",
|
311
|
+
'bundleId' => asc_app.bundle_id,
|
312
|
+
'lastModifiedDate' => nil,
|
313
|
+
'issuesCount' => nil,
|
314
|
+
'iconUrl' => nil,
|
315
|
+
'versionSets' => platforms.map do |platform|
|
316
|
+
{ 'type' => 'app', 'platformString' => platform }
|
317
|
+
end
|
318
|
+
}
|
319
|
+
end
|
259
320
|
end
|
260
321
|
|
261
322
|
def app_details(app_id)
|
@@ -164,7 +164,7 @@ module Spaceship
|
|
164
164
|
body = { "securityCode" => { "code" => code.to_s } }.to_json
|
165
165
|
|
166
166
|
# User exited by entering `sms` and wants to choose phone number for SMS
|
167
|
-
if code
|
167
|
+
if code.casecmp?("sms")
|
168
168
|
code_type = 'phone'
|
169
169
|
body = request_two_factor_code_from_phone_choose(response.body["trustedPhoneNumbers"], code_length)
|
170
170
|
end
|
@@ -15,7 +15,7 @@ module Trainer
|
|
15
15
|
|
16
16
|
lib_path = Trainer::ROOT
|
17
17
|
xml_path = File.join(lib_path, "lib/assets/junit.xml.erb")
|
18
|
-
xml = ERB.new(File.read(xml_path),
|
18
|
+
xml = ERB.new(File.read(xml_path), trim_mode: '<>').result(binding) # http://www.rrn.dk/rubys-erb-templating-system
|
19
19
|
|
20
20
|
xml = xml.gsub('system_', 'system-').delete("\e") # Jenkins can not parse 'ESC' symbol
|
21
21
|
|