fastlane 2.129.0 → 2.134.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 +66 -66
- 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.rb +4 -1
- data/fastlane/lib/fastlane/actions/.download_dsyms.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/actions_helper.rb +4 -0
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +11 -3
- data/fastlane/lib/fastlane/actions/carthage.rb +11 -3
- data/fastlane/lib/fastlane/actions/cocoapods.rb +24 -2
- data/fastlane/lib/fastlane/actions/copy_artifacts.rb +1 -1
- data/fastlane/lib/fastlane/actions/danger.rb +7 -0
- data/fastlane/lib/fastlane/actions/deploygate.rb +1 -1
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +23 -4
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +59 -10
- 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/gradle.rb +11 -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 +38 -22
- data/fastlane/lib/fastlane/actions/resign.rb +2 -2
- data/fastlane/lib/fastlane/actions/slather.rb +1 -0
- 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/commands_generator.rb +16 -0
- data/fastlane/lib/fastlane/environment_printer.rb +7 -1
- data/fastlane/lib/fastlane/fast_file.rb +10 -4
- data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +1 -1
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +2 -0
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +3 -0
- data/fastlane/lib/fastlane/setup/setup_android.rb +1 -1
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +122 -34
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +72 -3
- data/fastlane/lib/fastlane/swift_runner_upgrader.rb +4 -0
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +15 -0
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +121 -1
- data/fastlane/swift/Fastlane.swift +3925 -30
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +9 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +91 -9
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +65 -1
- data/fastlane/swift/Plugins.swift +15 -0
- 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/swift/upgrade_manifest.json +1 -1
- data/fastlane_core/lib/fastlane_core/command_executor.rb +1 -1
- data/fastlane_core/lib/fastlane_core/device_manager.rb +1 -1
- data/fastlane_core/lib/fastlane_core/helper.rb +1 -1
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +1 -3
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +3 -2
- data/frameit/lib/frameit/screenshot.rb +4 -0
- data/gym/lib/gym/generators/build_command_generator.rb +5 -1
- data/gym/lib/gym/options.rb +16 -16
- data/gym/lib/gym/runner.rb +33 -5
- data/match/lib/match/generator.rb +1 -0
- data/match/lib/match/importer.rb +2 -2
- data/match/lib/match/module.rb +2 -0
- data/match/lib/match/nuke.rb +5 -5
- data/match/lib/match/options.rb +17 -0
- data/match/lib/match/runner.rb +10 -6
- 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/sigh/download_all.rb +48 -8
- data/sigh/lib/sigh/runner.rb +13 -5
- data/snapshot/lib/snapshot/commands_generator.rb +2 -2
- 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 +1 -1
- data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +16 -1
- data/snapshot/lib/snapshot/update.rb +4 -2
- data/spaceship/lib/spaceship/client.rb +3 -3
- 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/.certificate.rb.swp +0 -0
- 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/availability.rb +40 -8
- data/spaceship/lib/spaceship/tunes/b2b_organization.rb +50 -0
- data/spaceship/lib/spaceship/tunes/iap_family_details.rb +10 -2
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +26 -1
- metadata +55 -46
@@ -47,6 +47,10 @@ module Fastlane
|
|
47
47
|
command << "--verbose"
|
48
48
|
end
|
49
49
|
|
50
|
+
if params[:use_modular_headers]
|
51
|
+
command << "--use-modular-headers"
|
52
|
+
end
|
53
|
+
|
50
54
|
result = Actions.sh(command.join(' '))
|
51
55
|
UI.success("Successfully pushed Podspec ⬆️ ")
|
52
56
|
return result
|
@@ -118,7 +122,12 @@ module Fastlane
|
|
118
122
|
optional: true,
|
119
123
|
type: Boolean,
|
120
124
|
default_value: false,
|
121
|
-
env_name: "FL_POD_PUSH_VERBOSE")
|
125
|
+
env_name: "FL_POD_PUSH_VERBOSE"),
|
126
|
+
FastlaneCore::ConfigItem.new(key: :use_modular_headers,
|
127
|
+
description: "Use modular headers option during validation",
|
128
|
+
optional: true,
|
129
|
+
type: Boolean,
|
130
|
+
env_name: "FL_POD_PUSH_USE_MODULAR_HEADERS")
|
122
131
|
]
|
123
132
|
end
|
124
133
|
|
@@ -7,41 +7,53 @@ module Fastlane
|
|
7
7
|
[:ios, :mac].include?(platform)
|
8
8
|
end
|
9
9
|
|
10
|
+
def self.file_column_headers
|
11
|
+
['Device ID', 'Device Name', 'Device Platform']
|
12
|
+
end
|
13
|
+
|
10
14
|
def self.run(params)
|
11
|
-
|
15
|
+
if params[:devices]
|
16
|
+
new_devices = params[:devices].map do |name, udid|
|
17
|
+
[udid, name]
|
18
|
+
end
|
19
|
+
elsif params[:devices_file]
|
20
|
+
require 'csv'
|
12
21
|
|
13
|
-
|
14
|
-
|
22
|
+
devices_file = CSV.read(File.expand_path(File.join(params[:devices_file])), col_sep: "\t")
|
23
|
+
unless devices_file.first == file_column_headers.first(2) || devices_file.first == file_column_headers
|
24
|
+
UI.user_error!("Please provide a file according to the Apple Sample UDID file (https://developer.apple.com/account/resources/downloads/Multiple-Upload-Samples.zip)")
|
25
|
+
end
|
15
26
|
|
16
|
-
|
27
|
+
new_devices = devices_file.drop(1).map do |row|
|
28
|
+
UI.user_error!("Invalid device line, please provide a file according to the Apple Sample UDID file (https://developer.apple.com/account/resources/downloads/Multiple-Upload-Samples.zip)") unless (2..3).cover?(row.count)
|
29
|
+
row
|
30
|
+
end
|
31
|
+
else
|
32
|
+
UI.user_error!("You must pass either a valid `devices` or `devices_file`. Please check the readme.")
|
33
|
+
end
|
17
34
|
|
35
|
+
require 'spaceship'
|
18
36
|
credentials = CredentialsManager::AccountManager.new(user: params[:username])
|
19
37
|
Spaceship.login(credentials.user, credentials.password)
|
20
38
|
Spaceship.select_team
|
21
39
|
|
22
40
|
UI.message("Fetching list of currently registered devices...")
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
30
|
-
elsif devices_file
|
31
|
-
require 'csv'
|
41
|
+
all_platforms = Set[params[:platform]]
|
42
|
+
new_devices.each do |device|
|
43
|
+
next if device[2].nil?
|
44
|
+
all_platforms.add(device[2])
|
45
|
+
end
|
46
|
+
supported_platforms = all_platforms.select { |platform| self.is_supported?(platform.to_sym) }
|
32
47
|
|
33
|
-
|
34
|
-
UI.user_error!("Please provide a file according to the Apple Sample UDID file (https://devimages.apple.com.edgekey.net/downloads/devices/Multiple-Upload-Samples.zip)") unless devices_file.first == ['Device ID', 'Device Name']
|
48
|
+
existing_devices = supported_platforms.flat_map { |platform| Spaceship::Device.all(mac: platform == "mac") }
|
35
49
|
|
36
|
-
|
37
|
-
|
50
|
+
device_objs = new_devices.map do |device|
|
51
|
+
next if existing_devices.map(&:udid).include?(device[0])
|
38
52
|
|
39
|
-
|
53
|
+
device_platform_supported = !device[2].nil? && self.is_supported?(device[2].to_sym)
|
54
|
+
mac = (device_platform_supported ? device[2] : params[:platform]) == "mac"
|
40
55
|
|
41
|
-
|
42
|
-
end
|
43
|
-
else
|
44
|
-
UI.user_error!("You must pass either a valid `devices` or `devices_file`. Please check the readme.")
|
56
|
+
try_create_device(name: device[1], udid: device[0], mac: mac)
|
45
57
|
end
|
46
58
|
|
47
59
|
UI.success("Successfully registered new devices.")
|
@@ -55,6 +67,10 @@ module Fastlane
|
|
55
67
|
UI.crash!("Failed to register new device (name: #{name}, UDID: #{udid})")
|
56
68
|
end
|
57
69
|
|
70
|
+
#####################################################
|
71
|
+
# @!group Documentation
|
72
|
+
#####################################################
|
73
|
+
|
58
74
|
def self.description
|
59
75
|
"Registers new devices to the Apple Dev Portal"
|
60
76
|
end
|
@@ -26,7 +26,7 @@ module Fastlane
|
|
26
26
|
)',
|
27
27
|
'# You may provide multiple provisioning profiles if the application contains nested
|
28
28
|
# applications or app extensions, which need their own provisioning profile.
|
29
|
-
# You can do so by passing an array of
|
29
|
+
# You can do so by passing an array of provisioning profile strings or a hash
|
30
30
|
# that associates provisioning profile values to bundle identifier keys.
|
31
31
|
resign(
|
32
32
|
ipa: "path/to/ipa", # can omit if using the `ipa` action
|
@@ -75,7 +75,7 @@ module Fastlane
|
|
75
75
|
else [value]
|
76
76
|
end
|
77
77
|
files.each do |file|
|
78
|
-
UI.user_error!("Couldn't find
|
78
|
+
UI.user_error!("Couldn't find provisioning profile at path '#{file}'") unless File.exist?(file)
|
79
79
|
end
|
80
80
|
end),
|
81
81
|
FastlaneCore::ConfigItem.new(key: :version,
|
@@ -263,6 +263,7 @@ module Fastlane
|
|
263
263
|
FastlaneCore::ConfigItem.new(key: :binary_file,
|
264
264
|
env_name: "FL_SLATHER_BINARY_FILE",
|
265
265
|
description: "Binary file name to be used for code coverage",
|
266
|
+
type: Array,
|
266
267
|
skip_type_validation: true, # skipping validation for backwards compatibility with Boolean type
|
267
268
|
optional: true),
|
268
269
|
FastlaneCore::ConfigItem.new(key: :arch,
|
@@ -20,10 +20,12 @@ module Fastlane
|
|
20
20
|
sonar_scanner_args << "-Dsonar.sourceEncoding=\"#{params[:source_encoding]}\"" if params[:source_encoding]
|
21
21
|
sonar_scanner_args << "-Dsonar.login=\"#{params[:sonar_login]}\"" if params[:sonar_login]
|
22
22
|
sonar_scanner_args << "-Dsonar.host.url=\"#{params[:sonar_url]}\"" if params[:sonar_url]
|
23
|
+
sonar_scanner_args << "-Dsonar.organization=\"#{params[:sonar_organization]}\"" if params[:sonar_organization]
|
23
24
|
sonar_scanner_args << "-Dsonar.branch.name=\"#{params[:branch_name]}\"" if params[:branch_name]
|
24
25
|
sonar_scanner_args << "-Dsonar.pullrequest.branch=\"#{params[:pull_request_branch]}\"" if params[:pull_request_branch]
|
25
26
|
sonar_scanner_args << "-Dsonar.pullrequest.base=\"#{params[:pull_request_base]}\"" if params[:pull_request_base]
|
26
27
|
sonar_scanner_args << "-Dsonar.pullrequest.key=\"#{params[:pull_request_key]}\"" if params[:pull_request_key]
|
28
|
+
|
27
29
|
sonar_scanner_args << params[:sonar_runner_args] if params[:sonar_runner_args]
|
28
30
|
|
29
31
|
command = [
|
@@ -102,6 +104,11 @@ module Fastlane
|
|
102
104
|
description: "Pass the url of the Sonar server",
|
103
105
|
optional: true,
|
104
106
|
is_string: true),
|
107
|
+
FastlaneCore::ConfigItem.new(key: :sonar_organization,
|
108
|
+
env_name: "FL_SONAR_ORGANIZATION",
|
109
|
+
description: "Key of the organization on SonarCloud",
|
110
|
+
optional: true,
|
111
|
+
is_string: true),
|
105
112
|
FastlaneCore::ConfigItem.new(key: :branch_name,
|
106
113
|
env_name: "FL_SONAR_RUNNER_BRANCH_NAME",
|
107
114
|
description: "Pass the branch name which is getting scanned",
|
@@ -144,6 +151,15 @@ module Fastlane
|
|
144
151
|
project_version: "1.0",
|
145
152
|
project_name: "iOS - AwesomeApp",
|
146
153
|
sources_path: File.expand_path("../AwesomeApp")
|
154
|
+
)',
|
155
|
+
'sonar(
|
156
|
+
project_key: "name.gretzki.awesomeApp",
|
157
|
+
project_version: "1.0",
|
158
|
+
project_name: "iOS - AwesomeApp",
|
159
|
+
sources_path: File.expand_path("../AwesomeApp"),
|
160
|
+
sonar_organization: "myOrg",
|
161
|
+
sonar_login: "123456abcdef",
|
162
|
+
sonar_url: "https://sonarcloud.io"
|
147
163
|
)'
|
148
164
|
]
|
149
165
|
end
|
@@ -10,18 +10,10 @@ module Fastlane
|
|
10
10
|
def self.run(options)
|
11
11
|
return if options[:no_update] # this is used to update itself
|
12
12
|
|
13
|
-
tools_to_update =
|
14
|
-
tools_to_update ||= all_installed_tools
|
15
|
-
|
16
|
-
if tools_to_update.count == 0
|
17
|
-
UI.error("No tools specified or couldn't find any installed fastlane.tools")
|
18
|
-
return
|
19
|
-
end
|
20
|
-
|
13
|
+
tools_to_update = ALL_TOOLS
|
21
14
|
UI.message("Looking for updates for #{tools_to_update.join(', ')}...")
|
22
15
|
|
23
16
|
updater = Gem::CommandManager.instance[:update]
|
24
|
-
updater.options[:prerelease] = true if options[:nightly]
|
25
17
|
cleaner = Gem::CommandManager.instance[:cleanup]
|
26
18
|
|
27
19
|
gem_dir = ENV['GEM_HOME'] || Gem.dir
|
@@ -49,7 +41,6 @@ module Fastlane
|
|
49
41
|
|
50
42
|
if update_needed.count == 0
|
51
43
|
UI.success("Nothing to update ✅")
|
52
|
-
show_information_about_nightly_builds unless options[:nightly]
|
53
44
|
return
|
54
45
|
end
|
55
46
|
|
@@ -58,18 +49,13 @@ module Fastlane
|
|
58
49
|
|
59
50
|
update_needed.each do |tool_info|
|
60
51
|
tool = tool_info[0]
|
61
|
-
gem_version = tool_info[1]
|
62
52
|
local_version = Gem::Version.new(highest_versions[tool].version)
|
63
53
|
latest_official_version = FastlaneCore::UpdateChecker.fetch_latest(tool)
|
64
54
|
|
65
|
-
|
66
|
-
UI.message("Updating #{tool} from #{local_version.to_s.yellow} to nightly build #{gem_version.to_s.yellow}... (last official release #{latest_official_version.to_s.yellow}) 🚀")
|
67
|
-
else
|
68
|
-
UI.message("Updating #{tool} from #{local_version.to_s.yellow} to #{latest_official_version.to_s.yellow}... 🚀")
|
69
|
-
end
|
55
|
+
UI.message("Updating #{tool} from #{local_version.to_s.yellow} to #{latest_official_version.to_s.yellow}... 🚀")
|
70
56
|
|
71
57
|
# Approximate_recommendation will create a string like "~> 0.10" from a version 0.10.0, e.g. one that is valid for versions >= 0.10 and <1.0
|
72
|
-
requirement_version =
|
58
|
+
requirement_version = local_version.approximate_recommendation
|
73
59
|
updater.update_gem(tool, Gem::Requirement.new(requirement_version))
|
74
60
|
|
75
61
|
UI.success("Finished updating #{tool}")
|
@@ -79,34 +65,12 @@ module Fastlane
|
|
79
65
|
cleaner.options[:args] = tools_to_update
|
80
66
|
cleaner.execute
|
81
67
|
|
82
|
-
if options[:nightly]
|
83
|
-
UI.success("Thanks for using fastlane's nightly builds! This makes it easier for everyone to detect regressions earlier.")
|
84
|
-
UI.success("Please submit an issue on GitHub if anything behaves differently than it should 🍪")
|
85
|
-
else
|
86
|
-
show_information_about_nightly_builds
|
87
|
-
end
|
88
|
-
|
89
68
|
UI.message("fastlane.tools successfully updated! I will now restart myself... 😴")
|
90
69
|
|
91
70
|
# Set no_update to true so we don't try to update again
|
92
71
|
exec("FL_NO_UPDATE=true #{$PROGRAM_NAME} #{ARGV.join(' ')}")
|
93
72
|
end
|
94
73
|
|
95
|
-
def self.show_information_about_nightly_builds
|
96
|
-
UI.message("")
|
97
|
-
UI.message("Please help us test early releases of fastlane by opting into nightly builds 🌃")
|
98
|
-
UI.message("Just replace your `update_fastlane` call with")
|
99
|
-
UI.message("")
|
100
|
-
UI.command_output("update_fastlane(nightly: true)")
|
101
|
-
UI.message("")
|
102
|
-
UI.message("Nightly builds are reviewed and tested just like the public releases 🚂")
|
103
|
-
UI.message("")
|
104
|
-
end
|
105
|
-
|
106
|
-
def self.all_installed_tools
|
107
|
-
Gem::Specification.select { |s| ALL_TOOLS.include?(s.name) }.map(&:name).uniq
|
108
|
-
end
|
109
|
-
|
110
74
|
def self.description
|
111
75
|
"Makes sure fastlane-tools are up-to-date when running fastlane"
|
112
76
|
end
|
@@ -134,21 +98,17 @@ module Fastlane
|
|
134
98
|
|
135
99
|
def self.available_options
|
136
100
|
[
|
137
|
-
FastlaneCore::ConfigItem.new(key: :nightly,
|
138
|
-
env_name: "FL_UPDATE_FASTLANE_NIGHTLY",
|
139
|
-
description: "Opt-in to install and use nightly fastlane builds",
|
140
|
-
is_string: false,
|
141
|
-
default_value: false),
|
142
101
|
FastlaneCore::ConfigItem.new(key: :no_update,
|
143
102
|
env_name: "FL_NO_UPDATE",
|
144
103
|
description: "Don't update during this run. This is used internally",
|
145
104
|
is_string: false,
|
146
105
|
default_value: false),
|
147
|
-
FastlaneCore::ConfigItem.new(key: :
|
148
|
-
env_name: "
|
149
|
-
description: "
|
150
|
-
|
151
|
-
|
106
|
+
FastlaneCore::ConfigItem.new(key: :nightly,
|
107
|
+
env_name: "FL_UPDATE_FASTLANE_NIGHTLY",
|
108
|
+
description: "Opt-in to install and use nightly fastlane builds",
|
109
|
+
is_string: false,
|
110
|
+
default_value: false,
|
111
|
+
deprecated: "Nightly builds are no longer being made available")
|
152
112
|
]
|
153
113
|
end
|
154
114
|
|
@@ -0,0 +1,94 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
module SharedValues
|
4
|
+
KEYCHAIN_ACCESS_GROUPS = :KEYCHAIN_ACCESS_GROUPS
|
5
|
+
end
|
6
|
+
|
7
|
+
class UpdateKeychainAccessGroupsAction < Action
|
8
|
+
require 'plist'
|
9
|
+
|
10
|
+
def self.run(params)
|
11
|
+
UI.message("Entitlements File: #{params[:entitlements_file]}")
|
12
|
+
UI.message("New keychain access groups: #{params[:identifiers]}")
|
13
|
+
|
14
|
+
entitlements_file = params[:entitlements_file]
|
15
|
+
UI.user_error!("Could not find entitlements file at path '#{entitlements_file}'") unless File.exist?(entitlements_file)
|
16
|
+
|
17
|
+
# parse entitlements
|
18
|
+
result = Plist.parse_xml(entitlements_file)
|
19
|
+
UI.user_error!("Entitlements file at '#{entitlements_file}' cannot be parsed.") unless result
|
20
|
+
|
21
|
+
# keychain access groups key
|
22
|
+
keychain_access_groups_key = 'keychain-access-groups'
|
23
|
+
|
24
|
+
# get keychain access groups
|
25
|
+
keychain_access_groups_field = result[keychain_access_groups_key]
|
26
|
+
UI.user_error!("No existing keychain access groups field specified. Please specify an keychain access groups in the entitlements file.") unless keychain_access_groups_field
|
27
|
+
|
28
|
+
# set new keychain access groups
|
29
|
+
UI.message("Old keychain access groups: #{keychain_access_groups_field}")
|
30
|
+
result[keychain_access_groups_key] = params[:identifiers]
|
31
|
+
|
32
|
+
# save entitlements file
|
33
|
+
result.save_plist(entitlements_file)
|
34
|
+
UI.message("New keychain access groups: #{result[keychain_access_groups_key]}")
|
35
|
+
|
36
|
+
Actions.lane_context[SharedValues::KEYCHAIN_ACCESS_GROUPS] = result[keychain_access_groups_key]
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.description
|
40
|
+
"This action changes the keychain access groups in the entitlements file"
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.details
|
44
|
+
"Updates the Keychain Group Access Groups in the given Entitlements file, so you can have keychain access groups for the app store build and keychain access groups for an enterprise build."
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.available_options
|
48
|
+
[
|
49
|
+
FastlaneCore::ConfigItem.new(key: :entitlements_file,
|
50
|
+
env_name: "FL_UPDATE_KEYCHAIN_ACCESS_GROUPS_ENTITLEMENTS_FILE_PATH", # The name of the environment variable
|
51
|
+
description: "The path to the entitlement file which contains the keychain access groups", # a short description of this parameter
|
52
|
+
verify_block: proc do |value|
|
53
|
+
UI.user_error!("Please pass a path to an entitlements file. ") unless value.include?(".entitlements")
|
54
|
+
UI.user_error!("Could not find entitlements file") if !File.exist?(value) && !Helper.test?
|
55
|
+
end),
|
56
|
+
FastlaneCore::ConfigItem.new(key: :identifiers,
|
57
|
+
env_name: "FL_UPDATE_KEYCHAIN_ACCESS_GROUPS_IDENTIFIERS",
|
58
|
+
description: "An Array of unique identifiers for the keychain access groups. Eg. ['your.keychain.access.groups.identifiers']",
|
59
|
+
is_string: false,
|
60
|
+
verify_block: proc do |value|
|
61
|
+
UI.user_error!("The parameter identifiers need to be an Array.") unless value.kind_of?(Array)
|
62
|
+
end)
|
63
|
+
]
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.output
|
67
|
+
[
|
68
|
+
['KEYCHAIN_ACCESS_GROUPS', 'The new Keychain Access Groups']
|
69
|
+
]
|
70
|
+
end
|
71
|
+
|
72
|
+
def self.authors
|
73
|
+
["yutae"]
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.is_supported?(platform)
|
77
|
+
platform == :ios
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.example_code
|
81
|
+
[
|
82
|
+
'update_keychain_access_groups(
|
83
|
+
entitlements_file: "/path/to/entitlements_file.entitlements",
|
84
|
+
identifiers: ["your.keychain.access.groups.identifiers"]
|
85
|
+
)'
|
86
|
+
]
|
87
|
+
end
|
88
|
+
|
89
|
+
def self.category
|
90
|
+
:project
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -329,6 +329,22 @@ module Fastlane
|
|
329
329
|
end
|
330
330
|
end
|
331
331
|
|
332
|
+
#####################################################
|
333
|
+
# @!group Swift
|
334
|
+
#####################################################
|
335
|
+
|
336
|
+
if FastlaneCore::FastlaneFolder.swift?
|
337
|
+
command :generate_swift do |c|
|
338
|
+
c.syntax = 'fastlane generate_swift'
|
339
|
+
c.description = 'Generates additional Swift APIs for plugins and local actions'
|
340
|
+
|
341
|
+
c.action do |args, options|
|
342
|
+
SwiftActionsAPIGenerator.new(target_output_path: FastlaneCore::FastlaneFolder.swift_folder_path).generate_swift
|
343
|
+
SwiftPluginsAPIGenerator.new(target_output_path: FastlaneCore::FastlaneFolder.swift_folder_path).generate_swift
|
344
|
+
end
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
332
348
|
default_command(:trigger)
|
333
349
|
run!
|
334
350
|
end
|
@@ -211,7 +211,7 @@ module Fastlane
|
|
211
211
|
"OS" => os_version,
|
212
212
|
"Ruby" => RUBY_VERSION,
|
213
213
|
"Bundler?" => Helper.bundler?,
|
214
|
-
"Git" =>
|
214
|
+
"Git" => git_version,
|
215
215
|
"Installation Source" => anonymized_path($PROGRAM_NAME),
|
216
216
|
"Host" => "#{product} #{version} (#{build})",
|
217
217
|
"Ruby Lib Dir" => anonymized_path(RbConfig::CONFIG['libdir']),
|
@@ -293,5 +293,11 @@ module Fastlane
|
|
293
293
|
require 'open3'
|
294
294
|
Open3.popen3('pbcopy') { |input, _, _| input << string }
|
295
295
|
end
|
296
|
+
|
297
|
+
def self.git_version
|
298
|
+
return `git --version`.strip.split("\n").first
|
299
|
+
rescue
|
300
|
+
return "not found"
|
301
|
+
end
|
296
302
|
end
|
297
303
|
end
|
@@ -26,10 +26,15 @@ module Fastlane
|
|
26
26
|
'you should turn off smart quotes in your editor of choice.')
|
27
27
|
end
|
28
28
|
|
29
|
-
content.scan(/^\s*require (
|
29
|
+
content.scan(/^\s*require ["'](.*?)["']/).each do |current|
|
30
30
|
gem_name = current.last
|
31
31
|
next if gem_name.include?(".") # these are local gems
|
32
|
-
|
32
|
+
|
33
|
+
begin
|
34
|
+
require(gem_name)
|
35
|
+
rescue LoadError
|
36
|
+
UI.important("You have required a gem, if this is a third party gem, please use `fastlane_require '#{gem_name}'` to ensure the gem is installed locally.")
|
37
|
+
end
|
33
38
|
end
|
34
39
|
|
35
40
|
parse(content, @path)
|
@@ -190,6 +195,7 @@ module Fastlane
|
|
190
195
|
# sh("ls")
|
191
196
|
# sh("ls", log: false)
|
192
197
|
# sh(command: "ls")
|
198
|
+
# sh(command: "ls", step_name: "listing the files")
|
193
199
|
# sh(command: "ls", log: false)
|
194
200
|
def sh(*args, &b)
|
195
201
|
# First accepts hash (or named keywords) like other actions
|
@@ -207,8 +213,8 @@ module Fastlane
|
|
207
213
|
end
|
208
214
|
end
|
209
215
|
|
210
|
-
def self.sh(*command, log: true, error_callback: nil, &b)
|
211
|
-
command_header = log ? Actions.shell_command_from_args(*command) : "shell command"
|
216
|
+
def self.sh(*command, step_name: nil, log: true, error_callback: nil, &b)
|
217
|
+
command_header = log ? step_name || Actions.shell_command_from_args(*command) : "shell command"
|
212
218
|
Actions.execute_action(command_header) do
|
213
219
|
Actions.sh_no_action(*command, log: log, error_callback: error_callback, &b)
|
214
220
|
end
|