fastlane 2.182.0 → 2.184.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 +103 -96
- data/cert/lib/cert/runner.rb +3 -7
- data/deliver/lib/assets/summary.html.erb +10 -10
- 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 +4 -4
- 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/app_store_build_number.rb +7 -11
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +12 -2
- data/fastlane/lib/fastlane/actions/carthage.rb +1 -1
- data/fastlane/lib/fastlane/actions/check_app_store_metadata.rb +5 -1
- data/fastlane/lib/fastlane/actions/danger.rb +7 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +32 -12
- data/fastlane/lib/fastlane/actions/get_certificates.rb +5 -1
- data/fastlane/lib/fastlane/actions/get_managed_play_store_publishing_rights.rb +3 -1
- data/fastlane/lib/fastlane/actions/get_provisioning_profile.rb +5 -1
- data/fastlane/lib/fastlane/actions/git_pull.rb +4 -10
- data/fastlane/lib/fastlane/actions/hipchat.rb +2 -1
- data/fastlane/lib/fastlane/actions/notification.rb +1 -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/actions/xcodebuild.rb +5 -5
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -1
- data/fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb +1 -1
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +1 -1
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +6 -4
- 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 +473 -247
- 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 +39 -3
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +5 -0
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +5 -3
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +1 -1
- data/fastlane_core/lib/fastlane_core/device_manager.rb +1 -1
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +4 -1
- data/frameit/lib/frameit/config_parser.rb +2 -2
- data/frameit/lib/frameit/frame_downloader.rb +2 -1
- data/gym/lib/gym/code_signing_mapping.rb +2 -2
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +6 -5
- data/match/lib/match/importer.rb +6 -10
- data/match/lib/match/migrate.rb +2 -3
- data/match/lib/match/nuke.rb +3 -7
- 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 +7 -4
- data/pilot/lib/pilot/manager.rb +3 -7
- data/pilot/lib/pilot/options.rb +8 -0
- data/precheck/lib/precheck/runner.rb +8 -7
- data/scan/lib/scan/runner.rb +1 -1
- data/sigh/lib/assets/resign.sh +77 -46
- data/sigh/lib/sigh/download_all.rb +4 -8
- data/sigh/lib/sigh/runner.rb +4 -8
- data/spaceship/README.md +2 -2
- data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +35 -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/build.rb +2 -0
- data/spaceship/lib/spaceship/connect_api/token.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +4 -2
- data/supply/lib/supply/client.rb +2 -2
- data/supply/lib/supply/uploader.rb +2 -2
- metadata +42 -39
@@ -23,38 +23,6 @@ public enum OptionalConfigValue<T> {
|
|
23
23
|
}
|
24
24
|
}
|
25
25
|
|
26
|
-
extension Optional: ExpressibleByIntegerLiteral where Wrapped: ExpressibleByIntegerLiteral {
|
27
|
-
public typealias IntegerLiteralType = Wrapped.IntegerLiteralType
|
28
|
-
|
29
|
-
public init(integerLiteral value: Wrapped.IntegerLiteralType) {
|
30
|
-
self = .some(.init(integerLiteral: value))
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
extension Optional: ExpressibleByUnicodeScalarLiteral where Wrapped: ExpressibleByUnicodeScalarLiteral {
|
35
|
-
public typealias UnicodeScalarLiteralType = Wrapped.UnicodeScalarLiteralType
|
36
|
-
|
37
|
-
public init(unicodeScalarLiteral value: Wrapped.UnicodeScalarLiteralType) {
|
38
|
-
self = .some(.init(unicodeScalarLiteral: value))
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
42
|
-
extension Optional: ExpressibleByExtendedGraphemeClusterLiteral where Wrapped: ExpressibleByStringLiteral {
|
43
|
-
public typealias ExtendedGraphemeClusterLiteralType = Wrapped.ExtendedGraphemeClusterLiteralType
|
44
|
-
|
45
|
-
public init(extendedGraphemeClusterLiteral value: Wrapped.ExtendedGraphemeClusterLiteralType) {
|
46
|
-
self = .some(.init(extendedGraphemeClusterLiteral: value))
|
47
|
-
}
|
48
|
-
}
|
49
|
-
|
50
|
-
extension Optional: ExpressibleByStringLiteral where Wrapped: ExpressibleByStringLiteral {
|
51
|
-
public typealias StringLiteralType = Wrapped.StringLiteralType
|
52
|
-
|
53
|
-
public init(stringLiteral value: Wrapped.StringLiteralType) {
|
54
|
-
self = .some(.init(stringLiteral: value))
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
26
|
extension OptionalConfigValue: ExpressibleByUnicodeScalarLiteral where T == String? {
|
59
27
|
public typealias UnicodeScalarLiteralType = String
|
60
28
|
|
@@ -79,6 +47,8 @@ extension OptionalConfigValue: ExpressibleByStringLiteral where T == String? {
|
|
79
47
|
}
|
80
48
|
}
|
81
49
|
|
50
|
+
extension OptionalConfigValue: ExpressibleByStringInterpolation where T == String? {}
|
51
|
+
|
82
52
|
extension OptionalConfigValue: ExpressibleByNilLiteral {
|
83
53
|
public init(nilLiteral _: ()) {
|
84
54
|
self = .nil
|
@@ -2,30 +2,30 @@
|
|
2
2
|
"entries": {
|
3
3
|
"brew": {
|
4
4
|
"swiftformat": {
|
5
|
-
"version": "0.48.
|
5
|
+
"version": "0.48.3",
|
6
6
|
"bottle": {
|
7
7
|
"rebuild": 0,
|
8
8
|
"root_url": "https://ghcr.io/v2/homebrew/core",
|
9
9
|
"files": {
|
10
10
|
"arm64_big_sur": {
|
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:45f0d1d25e117bba4d30e3077c3445052bf4bb5238419a0747d851adbede06d1",
|
13
|
+
"sha256": "45f0d1d25e117bba4d30e3077c3445052bf4bb5238419a0747d851adbede06d1"
|
14
14
|
},
|
15
15
|
"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:fbc54de6090d46e3b63592e7d304871aced14d43d2b4b23dcef1bc997b4dd8a0",
|
18
|
+
"sha256": "fbc54de6090d46e3b63592e7d304871aced14d43d2b4b23dcef1bc997b4dd8a0"
|
19
19
|
},
|
20
20
|
"catalina": {
|
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:10aa177bc5b37892d4ec96e61051cf8ff5d12c6deeaef8cd276a0b2589c14848",
|
23
|
+
"sha256": "10aa177bc5b37892d4ec96e61051cf8ff5d12c6deeaef8cd276a0b2589c14848"
|
24
24
|
},
|
25
25
|
"mojave": {
|
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:4be65d16c76254414d779ebc8b7e0722d728657a21f6eeef29c7a15842dbc741",
|
28
|
+
"sha256": "4be65d16c76254414d779ebc8b7e0722d728657a21f6eeef29c7a15842dbc741"
|
29
29
|
}
|
30
30
|
}
|
31
31
|
}
|
@@ -35,9 +35,9 @@
|
|
35
35
|
"system": {
|
36
36
|
"macos": {
|
37
37
|
"catalina": {
|
38
|
-
"HOMEBREW_VERSION": "3.1.
|
38
|
+
"HOMEBREW_VERSION": "3.1.9-58-g7ae9cc3",
|
39
39
|
"HOMEBREW_PREFIX": "/usr/local",
|
40
|
-
"Homebrew/homebrew-core": "
|
40
|
+
"Homebrew/homebrew-core": "6b2b455850b3abf29ab327a17292e1c4eb7abd15",
|
41
41
|
"CLT": "11.0.0.33.12",
|
42
42
|
"Xcode": "12.4",
|
43
43
|
"macOS": "10.15.7"
|
@@ -3,12 +3,15 @@ require 'spaceship/connect_api'
|
|
3
3
|
require_relative 'ui/ui'
|
4
4
|
|
5
5
|
module FastlaneCore
|
6
|
+
class BuildWatcherError < StandardError
|
7
|
+
end
|
8
|
+
|
6
9
|
class BuildWatcher
|
7
10
|
VersionMatches = Struct.new(:version, :builds)
|
8
11
|
|
9
12
|
class << self
|
10
13
|
# @return The build we waited for. This method will always return a build
|
11
|
-
def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true, select_latest: false)
|
14
|
+
def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, timeout_duration: nil, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true, select_latest: false)
|
12
15
|
# Warn about train_version being removed in the future
|
13
16
|
if train_version
|
14
17
|
UI.deprecated(":train_version is no longer a used argument on FastlaneCore::BuildWatcher. Please use :app_version instead.")
|
@@ -23,6 +26,12 @@ module FastlaneCore
|
|
23
26
|
platform = Spaceship::ConnectAPI::Platform.map(platform) if platform
|
24
27
|
UI.message("Waiting for processing on... app_id: #{app_id}, app_version: #{app_version}, build_version: #{build_version}, platform: #{platform}")
|
25
28
|
|
29
|
+
build_watching_start_time = Time.new
|
30
|
+
unless timeout_duration.nil?
|
31
|
+
end_time = build_watching_start_time + timeout_duration
|
32
|
+
UI.message("Will timeout watching build after #{timeout_duration} seconds around #{end_time}...")
|
33
|
+
end
|
34
|
+
|
26
35
|
showed_info = false
|
27
36
|
loop do
|
28
37
|
matched_build, app_version_queried = matching_build(watched_app_version: app_version, watched_build_version: build_version, app_id: app_id, platform: platform, select_latest: select_latest)
|
@@ -53,6 +62,9 @@ module FastlaneCore
|
|
53
62
|
end
|
54
63
|
end
|
55
64
|
|
65
|
+
# Before next poll, force stop build watching, if we exceeded the 'timeout_duration' waiting time
|
66
|
+
force_stop_build_watching_if_required(start_time: build_watching_start_time, timeout_duration: timeout_duration)
|
67
|
+
|
56
68
|
sleep(poll_interval)
|
57
69
|
end
|
58
70
|
end
|
@@ -78,6 +90,16 @@ module FastlaneCore
|
|
78
90
|
watched_app_version_alternate = alternate_version(watched_app_version)
|
79
91
|
versions = [watched_app_version, watched_app_version_alternate].compact
|
80
92
|
|
93
|
+
if versions.empty?
|
94
|
+
if select_latest
|
95
|
+
message = watched_build_version.nil? ? "Searching for the latest build" : "Searching for the latest build with build number: #{watched_build_version}"
|
96
|
+
UI.message(message)
|
97
|
+
versions = [nil]
|
98
|
+
else
|
99
|
+
raise BuildWatcherError.new, "There is no app version to watch"
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
81
103
|
version_matches = versions.map do |version|
|
82
104
|
match = VersionMatches.new
|
83
105
|
match.version = version
|
@@ -98,8 +120,8 @@ module FastlaneCore
|
|
98
120
|
error_builds = matched_builds.map do |build|
|
99
121
|
"#{build.app_version}(#{build.version}) for #{build.platform} - #{build.processing_state}"
|
100
122
|
end.join("\n")
|
101
|
-
error_message = "
|
102
|
-
|
123
|
+
error_message = "Found more than 1 matching build: \n#{error_builds}"
|
124
|
+
raise BuildWatcherError.new, error_message
|
103
125
|
end
|
104
126
|
|
105
127
|
version_match = version_matches.reject do |match|
|
@@ -132,6 +154,20 @@ module FastlaneCore
|
|
132
154
|
UI.message("Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)")
|
133
155
|
end
|
134
156
|
end
|
157
|
+
|
158
|
+
def force_stop_build_watching_if_required(start_time: nil, timeout_duration: nil)
|
159
|
+
return if start_time.nil? || timeout_duration.nil? # keep watching build for App Store Connect processing
|
160
|
+
|
161
|
+
current_time = Time.new
|
162
|
+
end_time = start_time + timeout_duration
|
163
|
+
pending_duration = end_time - current_time
|
164
|
+
|
165
|
+
if current_time > end_time
|
166
|
+
UI.crash!("FastlaneCore::BuildWatcher exceeded the '#{timeout_duration.to_i}' seconds, Stopping now!")
|
167
|
+
else
|
168
|
+
UI.verbose("Will timeout watching build after pending #{pending_duration.to_i} seconds around #{end_time}...")
|
169
|
+
end
|
170
|
+
end
|
135
171
|
end
|
136
172
|
end
|
137
173
|
end
|
@@ -30,6 +30,11 @@ module FastlaneCore
|
|
30
30
|
type = option.is_string ? String : nil
|
31
31
|
end
|
32
32
|
|
33
|
+
# OptionParser doesn't like symbol but a symbol and string can be easily cast with `to_sym` and `to_s`
|
34
|
+
if type == Symbol
|
35
|
+
type = String
|
36
|
+
end
|
37
|
+
|
33
38
|
# Boolean is a fastlane thing, it's either TrueClass, or FalseClass, but we won't know
|
34
39
|
# that until runtime, so nil is the best we get
|
35
40
|
if type == Fastlane::Boolean
|
@@ -262,6 +262,8 @@ module FastlaneCore
|
|
262
262
|
return value.to_i if value.to_i.to_s == value.to_s
|
263
263
|
elsif data_type == Float
|
264
264
|
return value.to_f if value.to_f.to_s == value.to_s
|
265
|
+
elsif data_type == Symbol
|
266
|
+
return value.to_sym if value.to_sym.to_s == value.to_s
|
265
267
|
elsif allow_shell_conversion
|
266
268
|
return value.shelljoin if value.kind_of?(Array)
|
267
269
|
return value.map { |k, v| "#{k.to_s.shellescape}=#{v.shellescape}" }.join(' ') if value.kind_of?(Hash)
|
@@ -272,11 +274,11 @@ module FastlaneCore
|
|
272
274
|
rescue JSON::ParserError
|
273
275
|
end
|
274
276
|
elsif data_type != String
|
275
|
-
# Special treatment if the user specified true, false or YES, NO
|
277
|
+
# Special treatment if the user specified true, false, on, off or YES, NO
|
276
278
|
# There is no boolean type, so we just do it here
|
277
|
-
if %w(YES
|
279
|
+
if %w(yes YES true TRUE on ON).include?(value)
|
278
280
|
return true
|
279
|
-
elsif %w(NO
|
281
|
+
elsif %w(no NO false FALSE off OFF).include?(value)
|
280
282
|
return false
|
281
283
|
end
|
282
284
|
end
|
@@ -212,7 +212,7 @@ module FastlaneCore
|
|
212
212
|
# if 'force_ask' is true, the option is not required to be optional to ask
|
213
213
|
# rubocop:disable Metrics/PerceivedComplexity
|
214
214
|
def fetch(key, ask: true, force_ask: false)
|
215
|
-
UI.crash!("Key '#{key}' must be a symbol. Example
|
215
|
+
UI.crash!("Key '#{key}' must be a symbol. Example :#{key}") unless key.kind_of?(Symbol)
|
216
216
|
|
217
217
|
option = verify_options_key!(key)
|
218
218
|
|
@@ -118,7 +118,7 @@ module FastlaneCore
|
|
118
118
|
discover_devices(child_item, device_types, discovered_device_udids)
|
119
119
|
end
|
120
120
|
|
121
|
-
is_supported_device = device_types.any?
|
121
|
+
is_supported_device = device_types.any?(usb_item['_name'])
|
122
122
|
serial_num = usb_item['serial_num'] || ''
|
123
123
|
has_serial_number = serial_num.length == 40 || serial_num.length == 24
|
124
124
|
|
@@ -145,7 +145,10 @@ module FastlaneCore
|
|
145
145
|
def password(message)
|
146
146
|
verify_interactive!(message)
|
147
147
|
|
148
|
-
ask("#{format_string}#{message.to_s.yellow}")
|
148
|
+
ask("#{format_string}#{message.to_s.yellow}") do |q|
|
149
|
+
q.whitespace = :chomp
|
150
|
+
q.echo = "*"
|
151
|
+
end
|
149
152
|
end
|
150
153
|
|
151
154
|
private
|
@@ -121,12 +121,12 @@ module Frameit
|
|
121
121
|
|
122
122
|
def self.supported_color?(value)
|
123
123
|
return false if value.nil?
|
124
|
-
Color.all_colors.any?
|
124
|
+
Color.all_colors.any?(value)
|
125
125
|
end
|
126
126
|
|
127
127
|
def self.supported_platform?(value)
|
128
128
|
return false if value.nil?
|
129
|
-
Platform.all_platforms.any?
|
129
|
+
Platform.all_platforms.any?(value)
|
130
130
|
end
|
131
131
|
|
132
132
|
def self.supported_device?(value)
|
@@ -71,8 +71,9 @@ module Frameit
|
|
71
71
|
def download_file(path, txt: "file")
|
72
72
|
require 'uri'
|
73
73
|
require 'excon'
|
74
|
+
require 'addressable/uri'
|
74
75
|
|
75
|
-
url = File.join(HOST_URL, Frameit.frames_version, URI.
|
76
|
+
url = File.join(HOST_URL, Frameit.frames_version, Addressable::URI.encode(path))
|
76
77
|
UI.message("Downloading #{txt} from '#{url}' ...")
|
77
78
|
body = Excon.get(url).body
|
78
79
|
raise body if body.include?("<Error>")
|
@@ -17,8 +17,8 @@ module Gym
|
|
17
17
|
final_mapping = (primary_mapping || {}).dup # for verbose output at the end of the method
|
18
18
|
secondary_mapping ||= self.detect_project_profile_mapping # default to Xcode project
|
19
19
|
|
20
|
-
final_mapping =
|
21
|
-
secondary_mapping =
|
20
|
+
final_mapping = final_mapping.transform_keys(&:to_sym)
|
21
|
+
secondary_mapping = secondary_mapping.transform_keys(&:to_sym)
|
22
22
|
|
23
23
|
# Now it's time to merge the (potentially) existing mapping
|
24
24
|
# (e.g. coming from `provisioningProfiles` of the `export_options` or from previous match calls)
|
@@ -4,6 +4,7 @@
|
|
4
4
|
# because of
|
5
5
|
# `incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError)`
|
6
6
|
|
7
|
+
require 'addressable/uri'
|
7
8
|
require 'tempfile'
|
8
9
|
require 'xcodeproj'
|
9
10
|
|
@@ -154,12 +155,12 @@ module Gym
|
|
154
155
|
|
155
156
|
def normalize_export_options(hash)
|
156
157
|
# Normalize some values
|
157
|
-
hash[:onDemandResourcesAssetPacksBaseURL] = URI.
|
158
|
+
hash[:onDemandResourcesAssetPacksBaseURL] = Addressable::URI.encode(hash[:onDemandResourcesAssetPacksBaseURL]) if hash[:onDemandResourcesAssetPacksBaseURL]
|
158
159
|
if hash[:manifest]
|
159
|
-
hash[:manifest][:appURL] = URI.
|
160
|
-
hash[:manifest][:displayImageURL] = URI.
|
161
|
-
hash[:manifest][:fullSizeImageURL] = URI.
|
162
|
-
hash[:manifest][:assetPackManifestURL] = URI.
|
160
|
+
hash[:manifest][:appURL] = Addressable::URI.encode(hash[:manifest][:appURL]) if hash[:manifest][:appURL]
|
161
|
+
hash[:manifest][:displayImageURL] = Addressable::URI.encode(hash[:manifest][:displayImageURL]) if hash[:manifest][:displayImageURL]
|
162
|
+
hash[:manifest][:fullSizeImageURL] = Addressable::URI.encode(hash[:manifest][:fullSizeImageURL]) if hash[:manifest][:fullSizeImageURL]
|
163
|
+
hash[:manifest][:assetPackManifestURL] = Addressable::URI.encode(hash[:manifest][:assetPackManifestURL]) if hash[:manifest][:assetPackManifestURL]
|
163
164
|
end
|
164
165
|
hash
|
165
166
|
end
|
data/match/lib/match/importer.rb
CHANGED
@@ -93,15 +93,17 @@ module Match
|
|
93
93
|
dest_cert_path = File.join(output_dir_certs, "#{cert_name}.cer")
|
94
94
|
dest_p12_path = File.join(output_dir_certs, "#{p12_name}.p12")
|
95
95
|
else
|
96
|
-
|
97
|
-
token = api_token(params)
|
98
|
-
if token
|
96
|
+
if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
|
99
97
|
UI.message("Creating authorization token for App Store Connect API")
|
100
|
-
Spaceship::ConnectAPI.token =
|
98
|
+
Spaceship::ConnectAPI.token = api_token
|
99
|
+
elsif !Spaceship::ConnectAPI.token.nil?
|
100
|
+
UI.message("Using existing authorization token for App Store Connect API")
|
101
101
|
else
|
102
102
|
UI.message("Login to App Store Connect (#{params[:username]})")
|
103
103
|
Spaceship::ConnectAPI.login(params[:username], use_portal: true, use_tunes: false, portal_team_id: params[:team_id], team_name: params[:team_name])
|
104
104
|
end
|
105
|
+
|
106
|
+
# Need to get the cert id by comparing base64 encoded cert content with certificate content from the API responses
|
105
107
|
certs = Spaceship::ConnectAPI::Certificate.all(filter: { certificateType: certificate_type })
|
106
108
|
|
107
109
|
# Base64 encode contents to find match from API to find a cert ID
|
@@ -147,11 +149,5 @@ module Match
|
|
147
149
|
UI.user_error!("#{file_description} does not exist at path: #{file_path}") unless !file_path.nil? || optional
|
148
150
|
file_path
|
149
151
|
end
|
150
|
-
|
151
|
-
def api_token(params)
|
152
|
-
@api_token ||= Spaceship::ConnectAPI::Token.create(**params[:api_key]) if params[:api_key]
|
153
|
-
@api_token ||= Spaceship::ConnectAPI::Token.from_json_file(params[:api_key_path]) if params[:api_key_path]
|
154
|
-
return @api_token
|
155
|
-
end
|
156
152
|
end
|
157
153
|
end
|