fastlane 2.143.0 → 2.147.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 +82 -82
- data/credentials_manager/lib/credentials_manager/appfile_config.rb +4 -0
- data/deliver/lib/deliver/app_screenshot.rb +1 -0
- data/deliver/lib/deliver/options.rb +30 -1
- data/deliver/lib/deliver/setup.rb +4 -4
- data/fastlane/lib/assets/custom_action_template.rb +6 -6
- data/fastlane/lib/fastlane/actions/automatic_code_signing.rb +7 -1
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +3 -0
- data/fastlane/lib/fastlane/actions/cocoapods.rb +1 -1
- data/fastlane/lib/fastlane/actions/crashlytics.rb +14 -2
- data/fastlane/lib/fastlane/actions/create_pull_request.rb +7 -1
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +13 -5
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +3 -3
- data/fastlane/lib/fastlane/actions/get_version_number.rb +1 -1
- data/fastlane/lib/fastlane/actions/git_branch.rb +1 -1
- data/fastlane/lib/fastlane/actions/pod_lib_lint.rb +7 -1
- data/fastlane/lib/fastlane/actions/set_pod_key.rb +3 -3
- data/fastlane/lib/fastlane/actions/setup_ci.rb +1 -1
- data/fastlane/lib/fastlane/actions/setup_jenkins.rb +11 -2
- data/fastlane/lib/fastlane/actions/slather.rb +1 -1
- data/fastlane/lib/fastlane/actions/swiftlint.rb +28 -7
- data/fastlane/lib/fastlane/actions/testfairy.rb +18 -3
- data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +203 -0
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +1 -1
- data/fastlane/lib/fastlane/actions/verify_build.rb +1 -1
- data/fastlane/lib/fastlane/actions/verify_xcode.rb +7 -0
- data/fastlane/lib/fastlane/commands_generator.rb +4 -1
- data/fastlane/lib/fastlane/helper/lane_helper.rb +13 -0
- data/fastlane/lib/fastlane/helper/s3_client_helper.rb +14 -9
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/Fastlane.swift +138 -23
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +6 -2
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +10 -2
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +9 -1
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +9 -0
- data/fastlane_core/lib/fastlane_core/device_manager.rb +3 -3
- 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/provisioning_profile.rb +15 -2
- data/frameit/lib/frameit/device_types.rb +10 -0
- data/frameit/lib/frameit/editor.rb +1 -1
- data/frameit/lib/frameit/options.rb +5 -2
- data/frameit/lib/frameit/runner.rb +5 -0
- data/frameit/lib/frameit/screenshot.rb +5 -0
- data/gym/lib/gym/generators/package_command_generator.rb +4 -0
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +5 -0
- data/gym/lib/gym/runner.rb +14 -0
- data/match/lib/match/change_password.rb +1 -18
- data/match/lib/match/encryption/openssl.rb +1 -1
- data/match/lib/match/generator.rb +5 -1
- data/match/lib/match/importer.rb +35 -18
- data/match/lib/match/options.rb +6 -1
- data/match/lib/match/storage/s3_storage.rb +10 -5
- data/match/lib/match/utils.rb +1 -1
- data/pilot/lib/pilot/build_manager.rb +15 -4
- data/pilot/lib/pilot/options.rb +8 -0
- data/produce/lib/produce/developer_center.rb +11 -2
- data/produce/lib/produce/itunes_connect.rb +11 -3
- data/produce/lib/produce/options.rb +12 -0
- data/scan/lib/scan/options.rb +11 -1
- data/scan/lib/scan/runner.rb +2 -0
- data/scan/lib/scan/test_command_generator.rb +4 -1
- data/screengrab/lib/screengrab/runner.rb +1 -1
- data/snapshot/lib/assets/SnapfileTemplate +3 -0
- data/snapshot/lib/snapshot/options.rb +10 -0
- data/snapshot/lib/snapshot/reports_generator.rb +4 -0
- 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 +21 -0
- data/snapshot/lib/snapshot/test_command_generator_base.rb +3 -0
- data/spaceship/lib/spaceship/base.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/model.rb +6 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +11 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +23 -0
- data/spaceship/lib/spaceship/portal/app_service.rb +2 -2
- data/spaceship/lib/spaceship/portal/portal_client.rb +13 -0
- data/spaceship/lib/spaceship/tunes/app_version.rb +6 -1
- data/spaceship/lib/spaceship/tunes/application.rb +2 -1
- data/spaceship/lib/spaceship/tunes/iap.rb +15 -0
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +16 -2
- data/spaceship/lib/spaceship/two_step_or_factor_client.rb +52 -16
- data/supply/lib/supply/.client.rb.swp +0 -0
- data/supply/lib/supply/client.rb +4 -4
- data/supply/lib/supply/setup.rb +5 -3
- metadata +40 -32
- data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/pilot/lib/pilot/.manager.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/.DS_Store +0 -0
- data/spaceship/lib/spaceship/portal/.certificate.rb.swp +0 -0
@@ -69,7 +69,7 @@ protocol MatchfileProtocol: class {
|
|
69
69
|
/// S3 access key
|
70
70
|
var s3AccessKey: String? { get }
|
71
71
|
|
72
|
-
/// S3 secret
|
72
|
+
/// S3 secret access key
|
73
73
|
var s3SecretAccessKey: String? { get }
|
74
74
|
|
75
75
|
/// Name of the S3 bucket
|
@@ -99,6 +99,9 @@ protocol MatchfileProtocol: class {
|
|
99
99
|
/// 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")
|
100
100
|
var templateName: String? { get }
|
101
101
|
|
102
|
+
/// A custom name for the provisioning profile. This will replace the default provisioning profile name if specified
|
103
|
+
var profileName: String? { get }
|
104
|
+
|
102
105
|
/// Path in which to export certificates, key and profile
|
103
106
|
var outputPath: String? { get }
|
104
107
|
|
@@ -140,10 +143,11 @@ extension MatchfileProtocol {
|
|
140
143
|
var skipDocs: Bool { return false }
|
141
144
|
var platform: String { return "ios" }
|
142
145
|
var templateName: String? { return nil }
|
146
|
+
var profileName: String? { return nil }
|
143
147
|
var outputPath: String? { return nil }
|
144
148
|
var verbose: Bool { return false }
|
145
149
|
}
|
146
150
|
|
147
151
|
// Please don't remove the lines below
|
148
152
|
// They are used to detect outdated files
|
149
|
-
// FastlaneRunnerAPIVersion [0.9.
|
153
|
+
// FastlaneRunnerAPIVersion [0.9.16]
|
@@ -42,6 +42,9 @@ protocol ScanfileProtocol: class {
|
|
42
42
|
/// Array of strings matching Test Bundle/Test Suite/Test Cases to skip
|
43
43
|
var skipTesting: String? { get }
|
44
44
|
|
45
|
+
/// The testplan associated with the scheme that should be used for testing
|
46
|
+
var testplan: String? { get }
|
47
|
+
|
45
48
|
/// Run tests using the provided `.xctestrun` file
|
46
49
|
var xctestrun: String? { get }
|
47
50
|
|
@@ -63,10 +66,13 @@ protocol ScanfileProtocol: class {
|
|
63
66
|
/// Should the HTML report be opened when tests are completed?
|
64
67
|
var openReport: Bool { get }
|
65
68
|
|
69
|
+
/// Disable xcpretty formatting of build, similar to `output_style='raw'` but this will also skip the test results table
|
70
|
+
var disableXcpretty: Bool? { get }
|
71
|
+
|
66
72
|
/// The directory in which all reports will be stored
|
67
73
|
var outputDirectory: String { get }
|
68
74
|
|
69
|
-
/// Define how the output should look like. Valid values are: standard, basic, rspec, or raw (disables xcpretty)
|
75
|
+
/// Define how the output should look like. Valid values are: standard, basic, rspec, or raw (disables xcpretty during xcodebuild)
|
70
76
|
var outputStyle: String? { get }
|
71
77
|
|
72
78
|
/// Comma separated list of the output types (e.g. html, junit, json-compilation-database)
|
@@ -193,6 +199,7 @@ extension ScanfileProtocol {
|
|
193
199
|
var appIdentifier: String? { return nil }
|
194
200
|
var onlyTesting: String? { return nil }
|
195
201
|
var skipTesting: String? { return nil }
|
202
|
+
var testplan: String? { return nil }
|
196
203
|
var xctestrun: String? { return nil }
|
197
204
|
var toolchain: String? { return nil }
|
198
205
|
var clean: Bool { return false }
|
@@ -200,6 +207,7 @@ extension ScanfileProtocol {
|
|
200
207
|
var addressSanitizer: Bool? { return nil }
|
201
208
|
var threadSanitizer: Bool? { return nil }
|
202
209
|
var openReport: Bool { return false }
|
210
|
+
var disableXcpretty: Bool? { return nil }
|
203
211
|
var outputDirectory: String { return "./test_output" }
|
204
212
|
var outputStyle: String? { return nil }
|
205
213
|
var outputTypes: String { return "html,junit" }
|
@@ -242,4 +250,4 @@ extension ScanfileProtocol {
|
|
242
250
|
|
243
251
|
// Please don't remove the lines below
|
244
252
|
// They are used to detect outdated files
|
245
|
-
// FastlaneRunnerAPIVersion [0.9.
|
253
|
+
// FastlaneRunnerAPIVersion [0.9.28]
|
@@ -45,6 +45,9 @@ protocol SnapshotfileProtocol: class {
|
|
45
45
|
/// Enabling this option will automatically erase the simulator before running the application
|
46
46
|
var eraseSimulator: Bool { get }
|
47
47
|
|
48
|
+
/// Enabling this option wil automatically override the status bar to show 9:41 AM, full battery, and full reception
|
49
|
+
var overrideStatusBar: Bool { get }
|
50
|
+
|
48
51
|
/// Enabling this option will configure the Simulator's system language
|
49
52
|
var localizeSimulator: Bool { get }
|
50
53
|
|
@@ -107,6 +110,9 @@ protocol SnapshotfileProtocol: class {
|
|
107
110
|
|
108
111
|
/// Sets a custom path for Swift Package Manager dependencies
|
109
112
|
var clonedSourcePackagesPath: String? { get }
|
113
|
+
|
114
|
+
/// The testplan associated with the scheme that should be used for testing
|
115
|
+
var testplan: String? { get }
|
110
116
|
}
|
111
117
|
|
112
118
|
extension SnapshotfileProtocol {
|
@@ -125,6 +131,7 @@ extension SnapshotfileProtocol {
|
|
125
131
|
var clearPreviousScreenshots: Bool { return false }
|
126
132
|
var reinstallApp: Bool { return false }
|
127
133
|
var eraseSimulator: Bool { return false }
|
134
|
+
var overrideStatusBar: Bool { return false }
|
128
135
|
var localizeSimulator: Bool { return false }
|
129
136
|
var darkMode: Bool? { return nil }
|
130
137
|
var appIdentifier: String? { return nil }
|
@@ -146,8 +153,9 @@ extension SnapshotfileProtocol {
|
|
146
153
|
var concurrentSimulators: Bool { return true }
|
147
154
|
var disableSlideToType: Bool { return false }
|
148
155
|
var clonedSourcePackagesPath: String? { return nil }
|
156
|
+
var testplan: String? { return nil }
|
149
157
|
}
|
150
158
|
|
151
159
|
// Please don't remove the lines below
|
152
160
|
// They are used to detect outdated files
|
153
|
-
// FastlaneRunnerAPIVersion [0.9.
|
161
|
+
// FastlaneRunnerAPIVersion [0.9.8]
|
@@ -2,6 +2,7 @@ require_relative '../ui/ui'
|
|
2
2
|
require_relative '../ui/errors/fastlane_error'
|
3
3
|
require_relative '../helper'
|
4
4
|
require_relative '../module'
|
5
|
+
require 'json'
|
5
6
|
|
6
7
|
module FastlaneCore
|
7
8
|
class ConfigItem
|
@@ -227,6 +228,7 @@ module FastlaneCore
|
|
227
228
|
true
|
228
229
|
end
|
229
230
|
|
231
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
230
232
|
# Returns an updated value type (if necessary)
|
231
233
|
def auto_convert_value(value)
|
232
234
|
return nil if value.nil?
|
@@ -240,6 +242,12 @@ module FastlaneCore
|
|
240
242
|
elsif allow_shell_conversion
|
241
243
|
return value.shelljoin if value.kind_of?(Array)
|
242
244
|
return value.map { |k, v| "#{k.to_s.shellescape}=#{v.shellescape}" }.join(' ') if value.kind_of?(Hash)
|
245
|
+
elsif data_type == Hash && value.kind_of?(String)
|
246
|
+
begin
|
247
|
+
parsed = JSON.parse(value)
|
248
|
+
return parsed if parsed.kind_of?(Hash)
|
249
|
+
rescue JSON::ParserError
|
250
|
+
end
|
243
251
|
elsif data_type != String
|
244
252
|
# Special treatment if the user specified true, false or YES, NO
|
245
253
|
# There is no boolean type, so we just do it here
|
@@ -249,6 +257,7 @@ module FastlaneCore
|
|
249
257
|
return false
|
250
258
|
end
|
251
259
|
end
|
260
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
252
261
|
|
253
262
|
return value # fallback to not doing anything
|
254
263
|
end
|
@@ -49,8 +49,8 @@ module FastlaneCore
|
|
49
49
|
|
50
50
|
# " iPad (5th generation) (852A5796-63C3-4641-9825-65EBDC5C4259) (Shutdown)"
|
51
51
|
# This line will turn the above string into
|
52
|
-
# ["iPad
|
53
|
-
matches = line.strip.scan(
|
52
|
+
# ["iPad (5th generation)", "(852A5796-63C3-4641-9825-65EBDC5C4259)", "(Shutdown)"]
|
53
|
+
matches = line.strip.scan(/^(.*?) (\([^)]*?\)) (\([^)]*?\))$/).flatten.reject(&:empty?)
|
54
54
|
state = matches.pop.to_s.delete('(').delete(')')
|
55
55
|
udid = matches.pop.to_s.delete('(').delete(')')
|
56
56
|
name = matches.join(' ')
|
@@ -223,7 +223,7 @@ module FastlaneCore
|
|
223
223
|
plist_buddy_cmd = "-c \"Add :KeyboardContinuousPathEnabled bool false\""
|
224
224
|
plist_path = File.expand_path("~/Library/Developer/CoreSimulator/Devices/#{self.udid}/data/Library/Preferences/com.apple.keyboard.ContinuousPath.plist")
|
225
225
|
|
226
|
-
Helper.backticks("#{plist_buddy} #{plist_buddy_cmd} #{plist_path}")
|
226
|
+
Helper.backticks("#{plist_buddy} #{plist_buddy_cmd} #{plist_path} >/dev/null 2>&1")
|
227
227
|
end
|
228
228
|
end
|
229
229
|
end
|
@@ -416,5 +416,22 @@ module FastlaneCore
|
|
416
416
|
UI.deprecated("Helper.log is deprecated. Use `UI` class instead")
|
417
417
|
UI.current.log
|
418
418
|
end
|
419
|
+
|
420
|
+
def self.ask_password(message: "Passphrase: ", confirm: nil)
|
421
|
+
raise "This code should only run in interactive mode" unless UI.interactive?
|
422
|
+
|
423
|
+
loop do
|
424
|
+
password = UI.password(message)
|
425
|
+
if confirm
|
426
|
+
password2 = UI.password("Type passphrase again: ")
|
427
|
+
if password == password2
|
428
|
+
return password
|
429
|
+
end
|
430
|
+
else
|
431
|
+
return password
|
432
|
+
end
|
433
|
+
UI.error("Passphrases differ. Try again")
|
434
|
+
end
|
435
|
+
end
|
419
436
|
end
|
420
437
|
end
|
@@ -1,9 +1,10 @@
|
|
1
1
|
require_relative 'helper'
|
2
2
|
require 'open3'
|
3
|
+
require 'security'
|
3
4
|
|
4
5
|
module FastlaneCore
|
5
6
|
class KeychainImporter
|
6
|
-
def self.import_file(path, keychain_path, keychain_password:
|
7
|
+
def self.import_file(path, keychain_path, keychain_password: nil, certificate_password: "", output: FastlaneCore::Globals.verbose?)
|
7
8
|
UI.user_error!("Could not find file '#{path}'") unless File.exist?(path)
|
8
9
|
|
9
10
|
command = "security import #{path.shellescape} -k '#{keychain_path.shellescape}'"
|
@@ -19,6 +20,7 @@ module FastlaneCore
|
|
19
20
|
|
20
21
|
# Set partition list only if success since it can be a time consuming process if a lot of keys are installed
|
21
22
|
if thrd.value.success?
|
23
|
+
keychain_password ||= resolve_keychain_password(keychain_path)
|
22
24
|
set_partition_list(path, keychain_path, keychain_password: keychain_password, output: output)
|
23
25
|
else
|
24
26
|
# Output verbose if file is already installed since not an error otherwise we will show the whole error
|
@@ -32,7 +34,7 @@ module FastlaneCore
|
|
32
34
|
end
|
33
35
|
end
|
34
36
|
|
35
|
-
def self.set_partition_list(path, keychain_path, keychain_password:
|
37
|
+
def self.set_partition_list(path, keychain_path, keychain_password: nil, output: FastlaneCore::Globals.verbose?)
|
36
38
|
# When security supports partition lists, also add the partition IDs
|
37
39
|
# See https://openradar.appspot.com/28524119
|
38
40
|
if Helper.backticks('security -h | grep set-key-partition-list', print: false).length > 0
|
@@ -53,6 +55,9 @@ module FastlaneCore
|
|
53
55
|
|
54
56
|
# Inform user when no/wrong password was used as its needed to prevent UI permission popup from Xcode when signing
|
55
57
|
if err.include?("SecKeychainItemSetAccessWithPassword")
|
58
|
+
keychain_name = File.basename(keychain_path, ".*")
|
59
|
+
Security::InternetPassword.delete(server: server_name(keychain_name))
|
60
|
+
|
56
61
|
UI.important("")
|
57
62
|
UI.important("Could not configure imported keychain item (certificate) to prevent UI permission popup when code signing\n" \
|
58
63
|
"Check if you supplied the correct `keychain_password` for keychain: `#{keychain_path}`\n" \
|
@@ -72,5 +77,44 @@ module FastlaneCore
|
|
72
77
|
|
73
78
|
end
|
74
79
|
end
|
80
|
+
|
81
|
+
# https://github.com/fastlane/fastlane/issues/14196
|
82
|
+
# Keychain password is needed to set the partition list to
|
83
|
+
# prevent Xcode from prompting dialog for keychain password when signing
|
84
|
+
# 1. Uses keychain password from login keychain if found
|
85
|
+
# 2. Prompts user for keychain password and stores it in login keychain for user later
|
86
|
+
def self.resolve_keychain_password(keychain_path)
|
87
|
+
keychain_name = File.basename(keychain_path, ".*")
|
88
|
+
server = server_name(keychain_name)
|
89
|
+
|
90
|
+
# Attempt to find password in keychain for keychain
|
91
|
+
item = Security::InternetPassword.find(server: server)
|
92
|
+
if item
|
93
|
+
keychain_password = item.password
|
94
|
+
UI.important("Using keychain password from keychain item #{server} in #{keychain_path}")
|
95
|
+
end
|
96
|
+
|
97
|
+
if keychain_password.nil?
|
98
|
+
if UI.interactive?
|
99
|
+
UI.important("Enter the password for #{keychain_path}")
|
100
|
+
UI.important("This passphrase will be stored in your local keychain with the name #{server} and used in future runs")
|
101
|
+
UI.important("This prompt can be avoided by specifying the 'keychain_password' option or 'MATCH_KEYCHAIN_PASSWORD' environment variable")
|
102
|
+
keychain_password = FastlaneCore::Helper.ask_password(message: "Password for #{keychain_name} keychain: ", confirm: true)
|
103
|
+
Security::InternetPassword.add(server, "", keychain_password)
|
104
|
+
else
|
105
|
+
UI.important("Keychain password for #{keychain_path} was not specified and not found in your keychain. Specify the 'keychain_password' option to prevent the UI permission popup when code signing")
|
106
|
+
keychain_password = ""
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
return keychain_password
|
111
|
+
end
|
112
|
+
|
113
|
+
# server name used for accessing the macOS keychain
|
114
|
+
def self.server_name(keychain_name)
|
115
|
+
["fastlane", "keychain", keychain_name].join("_")
|
116
|
+
end
|
117
|
+
|
118
|
+
private_class_method :server_name
|
75
119
|
end
|
76
120
|
end
|
@@ -44,16 +44,29 @@ module FastlaneCore
|
|
44
44
|
parse(path, keychain_path).fetch("Name")
|
45
45
|
end
|
46
46
|
|
47
|
+
def bundle_id(path, keychain_path = nil)
|
48
|
+
profile = parse(path, keychain_path)
|
49
|
+
app_id_prefix = profile["ApplicationIdentifierPrefix"].first
|
50
|
+
bundle_id = profile["Entitlements"]["application-identifier"].gsub("#{app_id_prefix}.", "")
|
51
|
+
bundle_id
|
52
|
+
rescue
|
53
|
+
UI.error("Unable to extract the Bundle Id from the provided provisioning profile '#{path}'.")
|
54
|
+
end
|
55
|
+
|
47
56
|
def mac?(path, keychain_path = nil)
|
48
57
|
parse(path, keychain_path).fetch("Platform", []).include?('OSX')
|
49
58
|
end
|
50
59
|
|
51
60
|
def profile_filename(path, keychain_path = nil)
|
52
61
|
basename = uuid(path, keychain_path)
|
62
|
+
basename + profile_extension(path, keychain_path)
|
63
|
+
end
|
64
|
+
|
65
|
+
def profile_extension(path, keychain_path = nil)
|
53
66
|
if mac?(path, keychain_path)
|
54
|
-
|
67
|
+
".provisionprofile"
|
55
68
|
else
|
56
|
-
|
69
|
+
".mobileprovision"
|
57
70
|
end
|
58
71
|
end
|
59
72
|
|
@@ -64,6 +64,14 @@ module Frameit
|
|
64
64
|
def self.all_platforms
|
65
65
|
Platform.constants.map { |c| Platform.const_get(c) }
|
66
66
|
end
|
67
|
+
|
68
|
+
def self.symbol_to_constant(symbol)
|
69
|
+
if symbol == :android
|
70
|
+
ANDROID
|
71
|
+
else
|
72
|
+
IOS
|
73
|
+
end
|
74
|
+
end
|
67
75
|
end
|
68
76
|
|
69
77
|
module Devices
|
@@ -119,6 +127,8 @@ module Frameit
|
|
119
127
|
IPAD_PRO = Frameit::Device.new("ipad-pro", "Apple iPad Pro", 3, [[2048, 2732], [2732, 2048]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_PRO)
|
120
128
|
# 3rd generation:
|
121
129
|
IPAD_PRO_12_9 = Frameit::Device.new("ipadPro129", "Apple iPad Pro (12.9-inch) (3rd generation)", 4, [[2048, 2732], [2732, 2048]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_PRO_12_9)
|
130
|
+
# 4th generation:
|
131
|
+
IPAD_PRO_12_9_4 = Frameit::Device.new("ipadPro129", "Apple iPad Pro (12.9-inch) (4th generation)", 5, [[2048, 2732], [2732, 2048]], 264, Color::SPACE_GRAY, Platform::IOS, Deliver::AppScreenshot::ScreenSize::IOS_IPAD_PRO_12_9)
|
122
132
|
# iPad Pro (10.5-inch) is not in frameit-frames repo, but must be included so that we are backward compatible with PR #15373
|
123
133
|
# priority must be lower so that users who didn't copy the frame to their frameit frames folder will not get an error
|
124
134
|
# ID and formatted name must be exactly as specified so that device.detect_device() will select this device if the filename includes them
|
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'fastlane_core/configuration/config_item'
|
2
|
+
require 'fastlane/actions/actions_helper'
|
3
|
+
require 'fastlane/helper/lane_helper'
|
2
4
|
|
3
5
|
require_relative 'module'
|
4
6
|
require_relative 'config_parser'
|
@@ -97,9 +99,10 @@ module Frameit
|
|
97
99
|
type: Boolean),
|
98
100
|
FastlaneCore::ConfigItem.new(key: :use_platform,
|
99
101
|
env_name: "FRAMEIT_USE_PLATFORM",
|
100
|
-
description: "Choose a platform, the valid options are IOS, ANDROID and ANY (
|
102
|
+
description: "Choose a platform, the valid options are IOS, ANDROID and ANY (default is either general platform defined in the fastfile or IOS to ensure backward compatibility)",
|
101
103
|
optional: true,
|
102
|
-
default_value: Platform::
|
104
|
+
default_value: Platform.symbol_to_constant(Fastlane::Helper::LaneHelper.current_platform),
|
105
|
+
default_value_dynamic: true,
|
103
106
|
verify_block: proc do |value|
|
104
107
|
UI.user_error!("Invalid platform type '#{value}'. Available values are " + Platform.all_platforms.join(', ') + ".") unless ConfigParser.supported_platform?(value)
|
105
108
|
end)
|
@@ -82,8 +82,13 @@ module Frameit
|
|
82
82
|
# Loads the config (colors, background, texts, etc.)
|
83
83
|
# Don't use this method to access the actual text and use `fetch_texts` instead
|
84
84
|
def create_config(screenshot_path)
|
85
|
+
# Screengrab pulls screenshots to a different folder location
|
86
|
+
# frameit only handles two levels of folders, to not break
|
87
|
+
# compatibility with Supply we look into a different path for Android
|
88
|
+
# Issue https://github.com/fastlane/fastlane/issues/16289
|
85
89
|
config_path = File.join(File.expand_path("..", screenshot_path), "Framefile.json")
|
86
90
|
config_path = File.join(File.expand_path("../..", screenshot_path), "Framefile.json") unless File.exist?(config_path)
|
91
|
+
config_path = File.join(File.expand_path("../../../..", screenshot_path), "Framefile.json") unless File.exist?(config_path)
|
87
92
|
file = ConfigParser.new.load(config_path)
|
88
93
|
return {} unless file # no config file at all
|
89
94
|
file.fetch_value(screenshot_path)
|
@@ -27,6 +27,7 @@ module Frameit
|
|
27
27
|
# - see Parameters in the doc
|
28
28
|
# - contains default values and validates values
|
29
29
|
# - accessed via Frameit.config[:key]
|
30
|
+
# - default value is either general platform from fastfile or IOS if run directly
|
30
31
|
# - lowest priority
|
31
32
|
# - commands_generator.rb
|
32
33
|
# - commands entered directly to CLI (e. g. fastlane frameit android)
|
@@ -122,6 +123,10 @@ module Frameit
|
|
122
123
|
return File.mtime(path) > File.mtime(output_path)
|
123
124
|
end
|
124
125
|
|
126
|
+
def language
|
127
|
+
@language ||= Pathname.new(path).parent.basename.to_s
|
128
|
+
end
|
129
|
+
|
125
130
|
def to_s
|
126
131
|
self.path
|
127
132
|
end
|
@@ -49,6 +49,10 @@ module Gym
|
|
49
49
|
generator.apps_path
|
50
50
|
end
|
51
51
|
|
52
|
+
def asset_packs_path
|
53
|
+
generator.asset_packs_path
|
54
|
+
end
|
55
|
+
|
52
56
|
# The generator we need to use for the currently used Xcode version
|
53
57
|
# Since we dropped Xcode 6 support, it's just this class, but maybe we'll have
|
54
58
|
# new classes in the future
|