fastlane 2.131.0 → 2.135.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 +70 -70
- data/cert/lib/cert/module.rb +2 -0
- data/cert/lib/cert/options.rb +6 -0
- data/cert/lib/cert/runner.rb +17 -11
- data/fastlane/lib/fastlane/action.rb +1 -1
- data/{pilot/lib/pilot/.manager.rb.swp → fastlane/lib/fastlane/actions/.google_play_track_version_codes.rb.swp} +0 -0
- data/fastlane/lib/fastlane/actions/actions_helper.rb +1 -1
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +10 -2
- data/fastlane/lib/fastlane/actions/carthage.rb +7 -0
- data/fastlane/lib/fastlane/actions/cocoapods.rb +24 -2
- data/fastlane/lib/fastlane/actions/copy_artifacts.rb +1 -1
- data/fastlane/lib/fastlane/actions/deploygate.rb +1 -1
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +26 -5
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +26 -2
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +26 -3
- data/fastlane/lib/fastlane/actions/download_from_play_store.rb +1 -1
- data/fastlane/lib/fastlane/actions/ensure_env_vars.rb +58 -0
- data/fastlane/lib/fastlane/actions/get_version_number.rb +12 -3
- data/fastlane/lib/fastlane/actions/google_play_track_version_codes.rb +5 -1
- data/fastlane/lib/fastlane/actions/onesignal.rb +59 -29
- data/fastlane/lib/fastlane/actions/pod_push.rb +10 -1
- data/fastlane/lib/fastlane/actions/register_devices.rb +1 -1
- data/fastlane/lib/fastlane/actions/sonar.rb +16 -0
- data/fastlane/lib/fastlane/actions/testfairy.rb +1 -1
- data/fastlane/lib/fastlane/actions/update_fastlane.rb +9 -49
- data/fastlane/lib/fastlane/actions/update_keychain_access_groups.rb +94 -0
- data/fastlane/lib/fastlane/environment_printer.rb +9 -3
- data/fastlane/lib/fastlane/fast_file.rb +10 -4
- data/fastlane/lib/fastlane/lane_manager.rb +1 -1
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +12 -2
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +1 -0
- data/fastlane/lib/fastlane/runner.rb +2 -2
- data/fastlane/lib/fastlane/setup/setup_android.rb +1 -1
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +10 -2
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +72 -3
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +121 -1
- data/fastlane/swift/Fastlane.swift +3928 -18
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +81 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +63 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +15 -2
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +109 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +39 -2
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +71 -1
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +3 -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/itunes_transporter.rb +1 -3
- data/fastlane_core/lib/fastlane_core/swag.rb +1 -1
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +1 -1
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +3 -2
- data/frameit/lib/frameit/screenshot.rb +4 -0
- data/match/lib/match/generator.rb +1 -0
- data/match/lib/match/importer.rb +1 -1
- data/match/lib/match/module.rb +2 -0
- data/match/lib/match/nuke.rb +5 -5
- data/match/lib/match/options.rb +12 -0
- data/match/lib/match/runner.rb +2 -0
- data/match/lib/match/storage/git_storage.rb +8 -2
- data/match/lib/match/storage/google_cloud_storage.rb +85 -33
- data/produce/lib/produce/service.rb +7 -1
- data/scan/lib/scan/error_handler.rb +9 -4
- data/scan/lib/scan/runner.rb +1 -1
- data/sigh/lib/assets/resign.sh +2 -2
- data/sigh/lib/sigh/runner.rb +13 -5
- data/snapshot/lib/snapshot/options.rb +5 -0
- data/snapshot/lib/snapshot/reports_generator.rb +3 -0
- data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +2 -2
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +16 -1
- data/spaceship/lib/spaceship/client.rb +2 -2
- data/spaceship/lib/spaceship/connect_api/models/app.rb +6 -6
- data/spaceship/lib/spaceship/connect_api/models/build.rb +3 -3
- data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/certificate.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/device.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/profile.rb +1 -1
- data/spaceship/lib/spaceship/portal/provisioning_profile.rb +1 -1
- data/spaceship/lib/spaceship/tunes/app_version.rb +4 -0
- data/spaceship/lib/spaceship/tunes/application.rb +4 -0
- data/spaceship/lib/spaceship/tunes/iap_family_details.rb +10 -2
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +25 -0
- data/supply/lib/supply.rb +23 -0
- data/supply/lib/supply/client.rb +101 -55
- data/supply/lib/supply/options.rb +49 -14
- data/supply/lib/supply/release_listing.rb +18 -0
- data/supply/lib/supply/setup.rb +42 -34
- data/supply/lib/supply/uploader.rb +168 -93
- metadata +50 -53
- 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/gym/lib/gym/.runner.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/.DS_Store +0 -0
@@ -1,22 +1,60 @@
|
|
1
1
|
protocol ScreengrabfileProtocol: class {
|
2
|
+
|
3
|
+
/// Path to the root of your Android SDK installation, e.g. ~/tools/android-sdk-macosx
|
2
4
|
var androidHome: String? { get }
|
5
|
+
|
6
|
+
/// The Android build tools version to use, e.g. '23.0.2'
|
3
7
|
var buildToolsVersion: String? { get }
|
8
|
+
|
9
|
+
/// A list of locales which should be used
|
4
10
|
var locales: [String] { get }
|
11
|
+
|
12
|
+
/// Enabling this option will automatically clear previously generated screenshots before running screengrab
|
5
13
|
var clearPreviousScreenshots: Bool { get }
|
14
|
+
|
15
|
+
/// The directory where to store the screenshots
|
6
16
|
var outputDirectory: String { get }
|
17
|
+
|
18
|
+
/// Don't open the summary after running _screengrab_
|
7
19
|
var skipOpenSummary: Bool { get }
|
20
|
+
|
21
|
+
/// The package name of the app under test (e.g. com.yourcompany.yourapp)
|
8
22
|
var appPackageName: String { get }
|
23
|
+
|
24
|
+
/// The package name of the tests bundle (e.g. com.yourcompany.yourapp.test)
|
9
25
|
var testsPackageName: String? { get }
|
26
|
+
|
27
|
+
/// Only run tests in these Java packages
|
10
28
|
var useTestsInPackages: [String]? { get }
|
29
|
+
|
30
|
+
/// Only run tests in these Java classes
|
11
31
|
var useTestsInClasses: [String]? { get }
|
32
|
+
|
33
|
+
/// Additional launch arguments
|
12
34
|
var launchArguments: [String]? { get }
|
35
|
+
|
36
|
+
/// The fully qualified class name of your test instrumentation runner
|
13
37
|
var testInstrumentationRunner: String { get }
|
38
|
+
|
39
|
+
/// Return the device to this locale after running tests
|
14
40
|
var endingLocale: String { get }
|
41
|
+
|
42
|
+
/// The path to the APK for the app under test
|
15
43
|
var appApkPath: String? { get }
|
44
|
+
|
45
|
+
/// The path to the APK for the the tests bundle
|
16
46
|
var testsApkPath: String? { get }
|
47
|
+
|
48
|
+
/// Use the device or emulator with the given serial number or qualifier
|
17
49
|
var specificDevice: String? { get }
|
50
|
+
|
51
|
+
/// Type of device used for screenshots. Matches Google Play Types (phone, sevenInch, tenInch, tv, wear)
|
18
52
|
var deviceType: String { get }
|
53
|
+
|
54
|
+
/// Whether or not to exit Screengrab on test failure. Exiting on failure will not copy sceenshots to local machine nor open sceenshots summary
|
19
55
|
var exitOnTestFailure: Bool { get }
|
56
|
+
|
57
|
+
/// Enabling this option will automatically uninstall the application before running it
|
20
58
|
var reinstallApp: Bool { get }
|
21
59
|
}
|
22
60
|
|
@@ -42,7 +80,6 @@ extension ScreengrabfileProtocol {
|
|
42
80
|
var reinstallApp: Bool { return false }
|
43
81
|
}
|
44
82
|
|
45
|
-
|
46
83
|
// Please don't remove the lines below
|
47
84
|
// They are used to detect outdated files
|
48
|
-
// FastlaneRunnerAPIVersion [0.9.
|
85
|
+
// FastlaneRunnerAPIVersion [0.9.11]
|
@@ -1,36 +1,105 @@
|
|
1
1
|
protocol SnapshotfileProtocol: class {
|
2
|
+
|
3
|
+
/// Path the workspace file
|
2
4
|
var workspace: String? { get }
|
5
|
+
|
6
|
+
/// Path the project file
|
3
7
|
var project: String? { get }
|
8
|
+
|
9
|
+
/// Pass additional arguments to xcodebuild for the test phase. Be sure to quote the setting names and values e.g. OTHER_LDFLAGS="-ObjC -lstdc++"
|
4
10
|
var xcargs: String? { get }
|
11
|
+
|
12
|
+
/// Use an extra XCCONFIG file to build your app
|
5
13
|
var xcconfig: String? { get }
|
14
|
+
|
15
|
+
/// A list of devices you want to take the screenshots from
|
6
16
|
var devices: [String]? { get }
|
17
|
+
|
18
|
+
/// A list of languages which should be used
|
7
19
|
var languages: [String] { get }
|
20
|
+
|
21
|
+
/// A list of launch arguments which should be used
|
8
22
|
var launchArguments: [String] { get }
|
23
|
+
|
24
|
+
/// The directory where to store the screenshots
|
9
25
|
var outputDirectory: String { get }
|
26
|
+
|
27
|
+
/// If the logs generated by the app (e.g. using NSLog, perror, etc.) in the Simulator should be written to the output_directory
|
10
28
|
var outputSimulatorLogs: Bool { get }
|
29
|
+
|
30
|
+
/// By default, the latest version should be used automatically. If you want to change it, do it here
|
11
31
|
var iosVersion: String? { get }
|
32
|
+
|
33
|
+
/// Don't open the HTML summary after running _snapshot_
|
12
34
|
var skipOpenSummary: Bool { get }
|
35
|
+
|
36
|
+
/// Do not check for most recent SnapshotHelper code
|
13
37
|
var skipHelperVersionCheck: Bool { get }
|
38
|
+
|
39
|
+
/// Enabling this option will automatically clear previously generated screenshots before running snapshot
|
14
40
|
var clearPreviousScreenshots: Bool { get }
|
41
|
+
|
42
|
+
/// Enabling this option will automatically uninstall the application before running it
|
15
43
|
var reinstallApp: Bool { get }
|
44
|
+
|
45
|
+
/// Enabling this option will automatically erase the simulator before running the application
|
16
46
|
var eraseSimulator: Bool { get }
|
47
|
+
|
48
|
+
/// Enabling this option will configure the Simulator's system language
|
17
49
|
var localizeSimulator: Bool { get }
|
50
|
+
|
51
|
+
/// Enabling this option will configure the Simulator to be in dark mode (false for light, true for dark)
|
52
|
+
var darkMode: Bool? { get }
|
53
|
+
|
54
|
+
/// The bundle identifier of the app to uninstall (only needed when enabling reinstall_app)
|
18
55
|
var appIdentifier: String? { get }
|
56
|
+
|
57
|
+
/// A list of photos that should be added to the simulator before running the application
|
19
58
|
var addPhotos: [String]? { get }
|
59
|
+
|
60
|
+
/// A list of videos that should be added to the simulator before running the application
|
20
61
|
var addVideos: [String]? { get }
|
62
|
+
|
63
|
+
/// The directory where to store the build log
|
21
64
|
var buildlogPath: String { get }
|
65
|
+
|
66
|
+
/// Should the project be cleaned before building it?
|
22
67
|
var clean: Bool { get }
|
68
|
+
|
69
|
+
/// Test without building, requires a derived data path
|
23
70
|
var testWithoutBuilding: Bool? { get }
|
71
|
+
|
72
|
+
/// The configuration to use when building the app. Defaults to 'Release'
|
24
73
|
var configuration: String? { get }
|
74
|
+
|
75
|
+
/// Additional xcpretty arguments
|
25
76
|
var xcprettyArgs: String? { get }
|
77
|
+
|
78
|
+
/// The SDK that should be used for building the application
|
26
79
|
var sdk: String? { get }
|
80
|
+
|
81
|
+
/// The scheme you want to use, this must be the scheme for the UI Tests
|
27
82
|
var scheme: String? { get }
|
83
|
+
|
84
|
+
/// The number of times a test can fail before snapshot should stop retrying
|
28
85
|
var numberOfRetries: Int { get }
|
86
|
+
|
87
|
+
/// Should snapshot stop immediately after the tests completely failed on one device?
|
29
88
|
var stopAfterFirstError: Bool { get }
|
89
|
+
|
90
|
+
/// The directory where build products and other derived data will go
|
30
91
|
var derivedDataPath: String? { get }
|
92
|
+
|
93
|
+
/// Should an Xcode result bundle be generated in the output directory
|
31
94
|
var resultBundle: Bool { get }
|
95
|
+
|
96
|
+
/// The name of the target you want to test (if you desire to override the Target Application from Xcode)
|
32
97
|
var testTargetName: String? { get }
|
98
|
+
|
99
|
+
/// Separate the log files per device and per language
|
33
100
|
var namespaceLogFiles: String? { get }
|
101
|
+
|
102
|
+
/// Take snapshots on multiple simulators concurrently. Note: This option is only applicable when running against Xcode 9
|
34
103
|
var concurrentSimulators: Bool { get }
|
35
104
|
}
|
36
105
|
|
@@ -51,6 +120,7 @@ extension SnapshotfileProtocol {
|
|
51
120
|
var reinstallApp: Bool { return false }
|
52
121
|
var eraseSimulator: Bool { return false }
|
53
122
|
var localizeSimulator: Bool { return false }
|
123
|
+
var darkMode: Bool? { return nil }
|
54
124
|
var appIdentifier: String? { return nil }
|
55
125
|
var addPhotos: [String]? { return nil }
|
56
126
|
var addVideos: [String]? { return nil }
|
@@ -72,4 +142,4 @@ extension SnapshotfileProtocol {
|
|
72
142
|
|
73
143
|
// Please don't remove the lines below
|
74
144
|
// They are used to detect outdated files
|
75
|
-
// FastlaneRunnerAPIVersion [0.9.
|
145
|
+
// FastlaneRunnerAPIVersion [0.9.6]
|
@@ -93,9 +93,9 @@ module FastlaneCore
|
|
93
93
|
return if short_switch.nil?
|
94
94
|
|
95
95
|
UI.user_error!("Short option #{short_switch} already taken for key #{key}") if used_switches.include?(short_switch)
|
96
|
-
UI.user_error!("-v is already used for the version (key #{key})") if short_switch == "-v"
|
97
|
-
UI.user_error!("-h is already used for the help screen (key #{key})") if short_switch == "-h"
|
98
|
-
UI.user_error!("-t is already used for the trace screen (key #{key})") if short_switch == "-t"
|
96
|
+
UI.user_error!("-v is already used for the fastlane version (key #{key})") if short_switch == "-v"
|
97
|
+
UI.user_error!("-h is already used for the fastlane help screen (key #{key})") if short_switch == "-h"
|
98
|
+
UI.user_error!("-t is already used for the fastlane trace screen (key #{key})") if short_switch == "-t"
|
99
99
|
|
100
100
|
used_switches << short_switch
|
101
101
|
end
|
@@ -120,7 +120,7 @@ module FastlaneCore
|
|
120
120
|
index = @available_options.find_index { |item| item.key == conflicting_option_key }
|
121
121
|
conflicting_option = @available_options[index]
|
122
122
|
|
123
|
-
# ignore conflicts because
|
123
|
+
# ignore conflicts because value of conflict option is nil
|
124
124
|
next if @values[conflicting_option.key].nil?
|
125
125
|
|
126
126
|
if current.conflict_block
|
@@ -307,7 +307,7 @@ module FastlaneCore
|
|
307
307
|
logarchive_dst = File.join(logs_destination_dir, "system_logs-#{log_identity}.logarchive").shellescape
|
308
308
|
FileUtils.rm_rf(logarchive_dst)
|
309
309
|
FileUtils.mkdir_p(File.expand_path("..", logarchive_dst))
|
310
|
-
command = "xcrun simctl spawn #{device.udid} log collect --output #{logarchive_dst} 2>/dev/null"
|
310
|
+
command = "xcrun simctl spawn --standalone #{device.udid} log collect --output #{logarchive_dst} 2>/dev/null"
|
311
311
|
FastlaneCore::CommandExecutor.execute(command: command, print_all: false, print_command: true)
|
312
312
|
end
|
313
313
|
end
|
@@ -154,7 +154,7 @@ module FastlaneCore
|
|
154
154
|
# As there was no communication from Apple, we don't know if this is a temporary
|
155
155
|
# server outage, or something they changed without giving a heads-up
|
156
156
|
if ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"].to_s.length == 0
|
157
|
-
ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"] = "-t DAV"
|
157
|
+
ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"] = "-t DAV,Signiant"
|
158
158
|
end
|
159
159
|
return ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"]
|
160
160
|
end
|
@@ -170,7 +170,6 @@ module FastlaneCore
|
|
170
170
|
"-p #{shell_escaped_password(password)}",
|
171
171
|
"-f \"#{source}\"",
|
172
172
|
additional_upload_parameters, # that's here, because the user might overwrite the -t option
|
173
|
-
"-t Signiant",
|
174
173
|
"-k 100000",
|
175
174
|
("-WONoPause true" if Helper.windows?), # Windows only: process instantly returns instead of waiting for key press
|
176
175
|
("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?)
|
@@ -255,7 +254,6 @@ module FastlaneCore
|
|
255
254
|
"-p #{password.shellescape}",
|
256
255
|
"-f #{source.shellescape}",
|
257
256
|
additional_upload_parameters, # that's here, because the user might overwrite the -t option
|
258
|
-
'-t Signiant',
|
259
257
|
'-k 100000',
|
260
258
|
("-itc_provider #{provider_short_name}" unless provider_short_name.to_s.empty?),
|
261
259
|
'2>&1' # cause stderr to be written to stdout
|
@@ -45,7 +45,7 @@ module FastlaneCore
|
|
45
45
|
|
46
46
|
def self.show_loader
|
47
47
|
return unless should_be_shown?
|
48
|
-
# sound is disabled as
|
48
|
+
# sound is disabled as I didn't find a royality free nice midi :(
|
49
49
|
@output = StringIO.new
|
50
50
|
# if FastlaneCore::Env.truthy?("FL_DO_SOUND")
|
51
51
|
# @sound_thr = Thread.new do
|
@@ -117,7 +117,7 @@ module Commander
|
|
117
117
|
abort(e.to_s)
|
118
118
|
end
|
119
119
|
end
|
120
|
-
rescue FastlaneCore::Interface::FastlaneCommonException => e # these are exceptions that we
|
120
|
+
rescue FastlaneCore::Interface::FastlaneCommonException => e # these are exceptions that we don't count as crashes
|
121
121
|
display_user_error!(e, e.to_s)
|
122
122
|
rescue FastlaneCore::Interface::FastlaneError => e # user_error!
|
123
123
|
rescue_fastlane_error(e)
|
@@ -30,12 +30,13 @@ module FastlaneCore
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def format_string(datetime = Time.now, severity = "")
|
33
|
+
timezone_string = !FastlaneCore::Env.truthy?('FASTLANE_SHOW_TIMEZONE') ? '' : ' %z'
|
33
34
|
if FastlaneCore::Globals.verbose?
|
34
|
-
return "#{severity} [#{datetime.strftime('%Y-%m-%d %H:%M:%S.%2N')}]: "
|
35
|
+
return "#{severity} [#{datetime.strftime('%Y-%m-%d %H:%M:%S.%2N' + timezone_string)}]: "
|
35
36
|
elsif FastlaneCore::Env.truthy?("FASTLANE_HIDE_TIMESTAMP")
|
36
37
|
return ""
|
37
38
|
else
|
38
|
-
return "[#{datetime.strftime('%H:%M:%S')}]: "
|
39
|
+
return "[#{datetime.strftime('%H:%M:%S' + timezone_string)}]: "
|
39
40
|
end
|
40
41
|
end
|
41
42
|
|
@@ -45,6 +45,10 @@ module Frameit
|
|
45
45
|
return 'iPhone 4'
|
46
46
|
when sizes::IOS_IPAD
|
47
47
|
return 'iPad Air 2'
|
48
|
+
when sizes::IOS_IPAD_10_5
|
49
|
+
return 'iPad Pro (10.5-inch)'
|
50
|
+
when sizes::IOS_IPAD_11
|
51
|
+
return 'iPad Pro (11-inch)'
|
48
52
|
when sizes::IOS_IPAD_PRO
|
49
53
|
return 'iPad Pro'
|
50
54
|
when sizes::IOS_IPAD_PRO_12_9
|
@@ -11,6 +11,7 @@ module Match
|
|
11
11
|
|
12
12
|
arguments = FastlaneCore::Configuration.create(Cert::Options.available_options, {
|
13
13
|
development: params[:type] == "development",
|
14
|
+
generate_apple_certs: params[:generate_apple_certs],
|
14
15
|
output_path: output_path,
|
15
16
|
force: true, # we don't need a certificate without its private key, we only care about a new certificate
|
16
17
|
username: params[:username],
|
data/match/lib/match/importer.rb
CHANGED
@@ -17,7 +17,7 @@ module Match
|
|
17
17
|
UI.user_error!("Certificate does not exist at path: #{cert_path}") unless File.exist?(cert_path)
|
18
18
|
UI.user_error!("Private key does not exist at path: #{p12_path}") unless File.exist?(p12_path)
|
19
19
|
|
20
|
-
# Base64
|
20
|
+
# Base64 encode contents to find match from API to find a cert ID
|
21
21
|
cert_contents_base_64 = Base64.strict_encode64(File.open(cert_path).read)
|
22
22
|
|
23
23
|
# Storage
|
data/match/lib/match/module.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
require 'fastlane_core/helper'
|
2
|
+
require 'fastlane/boolean'
|
2
3
|
|
3
4
|
module Match
|
4
5
|
Helper = FastlaneCore::Helper # you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore
|
5
6
|
UI = FastlaneCore::UI
|
7
|
+
Boolean = Fastlane::Boolean
|
6
8
|
ROOT = Pathname.new(File.expand_path('../../..', __FILE__))
|
7
9
|
DESCRIPTION = "Easily sync your certificates and profiles across your team"
|
8
10
|
|
data/match/lib/match/nuke.rb
CHANGED
@@ -100,7 +100,7 @@ module Match
|
|
100
100
|
prov_types = [:enterprise] if cert_type == :enterprise
|
101
101
|
|
102
102
|
Spaceship.login(params[:username])
|
103
|
-
Spaceship.select_team
|
103
|
+
Spaceship.select_team(team_id: params[:team_id], team_name: params[:team_name])
|
104
104
|
|
105
105
|
if Spaceship.client.in_house? && (type == "distribution" || type == "enterprise")
|
106
106
|
UI.error("---")
|
@@ -112,7 +112,7 @@ module Match
|
|
112
112
|
UI.user_error!("Enterprise account nuke cancelled") unless UI.confirm("Do you really want to nuke your Enterprise account?")
|
113
113
|
end
|
114
114
|
|
115
|
-
self.certs = certificate_type(cert_type).all
|
115
|
+
self.certs = certificate_type(cert_type).flat_map(&:all)
|
116
116
|
self.profiles = []
|
117
117
|
prov_types.each do |prov_type|
|
118
118
|
self.profiles += profile_type(prov_type).all
|
@@ -241,9 +241,9 @@ module Match
|
|
241
241
|
# The kind of certificate we're interested in
|
242
242
|
def certificate_type(type)
|
243
243
|
{
|
244
|
-
distribution: Spaceship.certificate.production,
|
245
|
-
development: Spaceship.certificate.development,
|
246
|
-
enterprise: Spaceship.certificate.in_house
|
244
|
+
distribution: [Spaceship.certificate.production, Spaceship.certificate.apple_distribution],
|
245
|
+
development: [Spaceship.certificate.development, Spaceship.certificate.apple_development],
|
246
|
+
enterprise: [Spaceship.certificate.in_house]
|
247
247
|
}[type] ||= raise "Unknown type '#{type}'"
|
248
248
|
end
|
249
249
|
|
data/match/lib/match/options.rb
CHANGED
@@ -32,6 +32,12 @@ module Match
|
|
32
32
|
description: "Only fetch existing certificates and profiles, don't generate new ones",
|
33
33
|
is_string: false,
|
34
34
|
default_value: false),
|
35
|
+
FastlaneCore::ConfigItem.new(key: :generate_apple_certs,
|
36
|
+
env_name: "MATCH_GENERATE_APPLE_CERTS",
|
37
|
+
description: "Create a certificate type for Xcode 11 and later (Apple Development or Apple Distribution)",
|
38
|
+
type: Boolean,
|
39
|
+
default_value: FastlaneCore::Helper.mac? && FastlaneCore::Helper.xcode_at_least?('11'),
|
40
|
+
default_value_dynamic: true),
|
35
41
|
FastlaneCore::ConfigItem.new(key: :skip_provisioning_profiles,
|
36
42
|
env_name: "MATCH_SKIP_PROVISIONING_PROFILES",
|
37
43
|
description: "Skip syncing provisioning profiles",
|
@@ -115,6 +121,12 @@ module Match
|
|
115
121
|
description: "Clone just the branch specified, instead of the whole repo. This requires that the branch already exists. Otherwise the command will fail",
|
116
122
|
is_string: false,
|
117
123
|
default_value: false),
|
124
|
+
FastlaneCore::ConfigItem.new(key: :git_basic_authorization,
|
125
|
+
env_name: "MATCH_GIT_BASIC_AUTHORIZATION",
|
126
|
+
sensitive: true,
|
127
|
+
description: "Use a basic authorization header to access the git repo (e.g.: access via HTTPS, GitHub Actions, etc), usually a string in Base64",
|
128
|
+
optional: true,
|
129
|
+
default_value: nil),
|
118
130
|
|
119
131
|
# Storage: Google Cloud
|
120
132
|
FastlaneCore::ConfigItem.new(key: :google_cloud_bucket_name,
|
data/match/lib/match/runner.rb
CHANGED
@@ -37,7 +37,9 @@ module Match
|
|
37
37
|
git_full_name: params[:git_full_name],
|
38
38
|
git_user_email: params[:git_user_email],
|
39
39
|
clone_branch_directly: params[:clone_branch_directly],
|
40
|
+
git_basic_authorization: params[:git_basic_authorization],
|
40
41
|
type: params[:type].to_s,
|
42
|
+
generate_apple_certs: params[:generate_apple_certs],
|
41
43
|
platform: params[:platform].to_s,
|
42
44
|
google_cloud_bucket_name: params[:google_cloud_bucket_name].to_s,
|
43
45
|
google_cloud_keys_file: params[:google_cloud_keys_file].to_s,
|
@@ -17,6 +17,7 @@ module Match
|
|
17
17
|
attr_accessor :clone_branch_directly
|
18
18
|
attr_accessor :type
|
19
19
|
attr_accessor :platform
|
20
|
+
attr_accessor :git_basic_authorization
|
20
21
|
|
21
22
|
def self.configure(params)
|
22
23
|
return self.new(
|
@@ -28,7 +29,8 @@ module Match
|
|
28
29
|
branch: params[:git_branch],
|
29
30
|
git_full_name: params[:git_full_name],
|
30
31
|
git_user_email: params[:git_user_email],
|
31
|
-
clone_branch_directly: params[:clone_branch_directly]
|
32
|
+
clone_branch_directly: params[:clone_branch_directly],
|
33
|
+
git_basic_authorization: params[:git_basic_authorization]
|
32
34
|
)
|
33
35
|
end
|
34
36
|
|
@@ -40,7 +42,8 @@ module Match
|
|
40
42
|
branch: "master",
|
41
43
|
git_full_name: nil,
|
42
44
|
git_user_email: nil,
|
43
|
-
clone_branch_directly: false
|
45
|
+
clone_branch_directly: false,
|
46
|
+
git_basic_authorization: nil)
|
44
47
|
self.git_url = git_url
|
45
48
|
self.shallow_clone = shallow_clone
|
46
49
|
self.skip_docs = skip_docs
|
@@ -48,6 +51,7 @@ module Match
|
|
48
51
|
self.git_full_name = git_full_name
|
49
52
|
self.git_user_email = git_user_email
|
50
53
|
self.clone_branch_directly = clone_branch_directly
|
54
|
+
self.git_basic_authorization = git_basic_authorization
|
51
55
|
|
52
56
|
self.type = type if type
|
53
57
|
self.platform = platform if platform
|
@@ -65,6 +69,8 @@ module Match
|
|
65
69
|
self.working_directory = Dir.mktmpdir
|
66
70
|
|
67
71
|
command = "git clone #{self.git_url.shellescape} #{self.working_directory.shellescape}"
|
72
|
+
command << " -c http.extraheader='AUTHORIZATION: basic #{self.git_basic_authorization}'" unless self.git_basic_authorization.nil?
|
73
|
+
|
68
74
|
if self.shallow_clone
|
69
75
|
command << " --depth 1 --no-single-branch"
|
70
76
|
elsif self.clone_branch_directly
|