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
@@ -108,7 +108,7 @@ module Fastlane
|
|
108
108
|
|
109
109
|
UI.important("Downloading Crashlytics Support Library - this might take a minute...")
|
110
110
|
result = http_conn.request_get(uri.path)
|
111
|
-
UI.error
|
111
|
+
UI.error("#{result.message} (#{result.code})") unless result.kind_of?(Net::HTTPSuccess)
|
112
112
|
File.write(zip_path, result.body)
|
113
113
|
|
114
114
|
# Now unzip the file
|
@@ -178,6 +178,7 @@ module Fastlane
|
|
178
178
|
with_clean_bundler_env do
|
179
179
|
cmd = "bundle install"
|
180
180
|
cmd << " --quiet" unless FastlaneCore::Globals.verbose?
|
181
|
+
cmd << " && bundle exec fastlane generate_swift" if FastlaneCore::FastlaneFolder.swift?
|
181
182
|
cmd << " && echo 'Successfully installed plugins'"
|
182
183
|
UI.command(cmd) if FastlaneCore::Globals.verbose?
|
183
184
|
exec(cmd)
|
@@ -197,6 +198,7 @@ module Fastlane
|
|
197
198
|
cmd = "bundle update"
|
198
199
|
cmd << " #{plugins.join(' ')}"
|
199
200
|
cmd << " --quiet" unless FastlaneCore::Globals.verbose?
|
201
|
+
cmd << " && bundle exec fastlane generate_swift" if FastlaneCore::FastlaneFolder.swift?
|
200
202
|
cmd << " && echo 'Successfully updated plugins'"
|
201
203
|
UI.command(cmd) if FastlaneCore::Globals.verbose?
|
202
204
|
exec(cmd)
|
@@ -55,7 +55,7 @@ module Fastlane
|
|
55
55
|
|
56
56
|
self.package_name = UI.input("Package Name (com.krausefx.app): ")
|
57
57
|
puts("")
|
58
|
-
puts("To automatically upload builds and metadata to Google Play, fastlane needs a service
|
58
|
+
puts("To automatically upload builds and metadata to Google Play, fastlane needs a service account json secret file".yellow)
|
59
59
|
puts("Follow the Setup Guide on how to get the Json file: https://docs.fastlane.tools/actions/supply/".yellow)
|
60
60
|
puts("Feel free to press Enter at any time in order to skip providing pieces of information when asked")
|
61
61
|
self.json_key_file = UI.input("Path to the json secret file: ")
|
@@ -13,28 +13,18 @@ module Fastlane
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
class
|
17
|
-
|
18
|
-
attr_accessor :tools_option_files
|
19
|
-
attr_accessor :actions_not_supported
|
20
|
-
attr_accessor :action_options_to_ignore
|
21
|
-
attr_accessor :target_output_path
|
22
|
-
attr_accessor :generated_paths # stores all file names of generated files (as they are generated)
|
16
|
+
class SwiftAPIGenerator
|
17
|
+
end
|
23
18
|
|
19
|
+
class SwiftFastlaneAPIGenerator < SwiftAPIGenerator
|
24
20
|
def initialize(target_output_path: "swift")
|
21
|
+
@target_filename = "Fastlane.swift"
|
25
22
|
@target_output_path = File.expand_path(target_output_path)
|
26
23
|
@generated_paths = []
|
27
|
-
require 'fastlane'
|
28
|
-
require 'fastlane/documentation/actions_list'
|
29
|
-
Fastlane.load_actions
|
30
|
-
# Tools that can be used with <Toolname>file, like Deliverfile, Screengrabfile
|
31
|
-
# this is important because we need to generate the proper api for these by creating a protocol
|
32
|
-
# with default implementation we can use in the Fastlane.swift API if people want to use
|
33
|
-
# <Toolname>file.swift files.
|
34
|
-
self.tools_option_files = TOOL_CONFIG_FILES.map { |config_file| config_file.downcase.chomp("file") }.to_set
|
35
24
|
|
36
|
-
|
25
|
+
super()
|
37
26
|
|
27
|
+
self.actions_not_supported = ["import", "import_from_git"].to_set
|
38
28
|
self.action_options_to_ignore = {
|
39
29
|
|
40
30
|
"precheck" => [
|
@@ -51,6 +41,109 @@ module Fastlane
|
|
51
41
|
}
|
52
42
|
end
|
53
43
|
|
44
|
+
def extend_content(file_content, tool_details)
|
45
|
+
file_content << "" # newline because we're adding an extension
|
46
|
+
file_content << "// These are all the parsing functions needed to transform our data into the expected types"
|
47
|
+
file_content << generate_lanefile_parsing_functions
|
48
|
+
|
49
|
+
tool_objects = generate_lanefile_tool_objects(classes: tool_details.map(&:swift_class))
|
50
|
+
file_content << tool_objects
|
51
|
+
|
52
|
+
old_file_content = File.read(fastlane_swift_api_path)
|
53
|
+
new_file_content = file_content.join("\n")
|
54
|
+
|
55
|
+
# compare old file content to potential new file content
|
56
|
+
api_version = determine_api_version(new_file_content: new_file_content, old_file_content: old_file_content)
|
57
|
+
old_api_version = find_api_version_string(content: old_file_content)
|
58
|
+
|
59
|
+
# if there is a change, we need to write out the new file
|
60
|
+
if api_version != old_api_version
|
61
|
+
file_content << autogen_version_warning_text(api_version: api_version)
|
62
|
+
else
|
63
|
+
file_content = nil
|
64
|
+
end
|
65
|
+
|
66
|
+
return file_content
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
class SwiftActionsAPIGenerator < SwiftAPIGenerator
|
71
|
+
def initialize(target_output_path: "swift")
|
72
|
+
@target_filename = "Actions.swift"
|
73
|
+
@target_output_path = File.expand_path(target_output_path)
|
74
|
+
@generated_paths = []
|
75
|
+
|
76
|
+
super()
|
77
|
+
|
78
|
+
# Excludes all actions that aren't external actions (including plugins)
|
79
|
+
available_external_actions = Fastlane.external_actions || []
|
80
|
+
available_actions = []
|
81
|
+
ActionsList.all_actions do |action|
|
82
|
+
available_actions << action.action_name unless available_external_actions.include?(action)
|
83
|
+
end
|
84
|
+
|
85
|
+
self.actions_not_supported = (["import", "import_from_git"] + available_actions).to_set
|
86
|
+
self.action_options_to_ignore = {}
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
class SwiftPluginsAPIGenerator < SwiftAPIGenerator
|
91
|
+
def initialize(target_output_path: "swift")
|
92
|
+
@target_filename = "Plugins.swift"
|
93
|
+
@target_output_path = File.expand_path(target_output_path)
|
94
|
+
@generated_paths = []
|
95
|
+
|
96
|
+
super()
|
97
|
+
|
98
|
+
# Gets list of plugin actions
|
99
|
+
plugin_actions = Fastlane.plugin_manager.plugin_references.values.flat_map do |info|
|
100
|
+
info[:actions]
|
101
|
+
end
|
102
|
+
|
103
|
+
# Action references from plugins
|
104
|
+
available_plugins = plugin_actions.map do |plugin_action|
|
105
|
+
Fastlane::Runner.new.class_reference_from_action_name(plugin_action)
|
106
|
+
end
|
107
|
+
|
108
|
+
# Excludes all actions that aren't pluign actions (including external actions)
|
109
|
+
available_actions = []
|
110
|
+
ActionsList.all_actions do |action|
|
111
|
+
available_actions << action.action_name unless available_plugins.include?(action)
|
112
|
+
end
|
113
|
+
|
114
|
+
self.actions_not_supported = (["import", "import_from_git"] + available_actions).to_set
|
115
|
+
self.action_options_to_ignore = {}
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
class SwiftAPIGenerator
|
120
|
+
DEFAULT_API_VERSION_STRING = "0.9.1"
|
121
|
+
attr_accessor :tools_option_files
|
122
|
+
attr_accessor :actions_not_supported
|
123
|
+
attr_accessor :action_options_to_ignore
|
124
|
+
attr_accessor :target_output_path
|
125
|
+
attr_accessor :target_filename
|
126
|
+
attr_accessor :generated_paths # stores all file names of generated files (as they are generated)
|
127
|
+
|
128
|
+
attr_accessor :fastlane_swift_api_path
|
129
|
+
|
130
|
+
def initialize
|
131
|
+
require 'fastlane'
|
132
|
+
require 'fastlane/documentation/actions_list'
|
133
|
+
Fastlane.load_actions
|
134
|
+
# Tools that can be used with <Toolname>file, like Deliverfile, Screengrabfile
|
135
|
+
# this is important because we need to generate the proper api for these by creating a protocol
|
136
|
+
# with default implementation we can use in the Fastlane.swift API if people want to use
|
137
|
+
# <Toolname>file.swift files.
|
138
|
+
self.tools_option_files = TOOL_CONFIG_FILES.map { |config_file| config_file.downcase.chomp("file") }.to_set
|
139
|
+
|
140
|
+
@fastlane_swift_api_path = File.join(@target_output_path, @target_filename)
|
141
|
+
end
|
142
|
+
|
143
|
+
def extend_content(content, tool_details)
|
144
|
+
return content
|
145
|
+
end
|
146
|
+
|
54
147
|
def generate_swift
|
55
148
|
self.generated_paths = [] # reset generated paths in case we're called multiple times
|
56
149
|
file_content = []
|
@@ -74,24 +167,11 @@ module Fastlane
|
|
74
167
|
|
75
168
|
file_content << swift_function.swift_code
|
76
169
|
end
|
77
|
-
file_content << "" # newline because we're adding an extension
|
78
|
-
file_content << "// These are all the parsing functions needed to transform our data into the expected types"
|
79
|
-
file_content << generate_lanefile_parsing_functions
|
80
|
-
|
81
|
-
tool_objects = generate_lanefile_tool_objects(classes: tool_details.map(&:swift_class))
|
82
|
-
file_content << tool_objects
|
83
|
-
new_file_content = file_content.join("\n")
|
84
|
-
|
85
|
-
fastlane_swift_api_path = File.join(@target_output_path, "Fastlane.swift")
|
86
|
-
old_file_content = File.read(fastlane_swift_api_path)
|
87
170
|
|
88
|
-
|
89
|
-
api_version = determine_api_version(new_file_content: new_file_content, old_file_content: old_file_content)
|
90
|
-
old_api_version = find_api_version_string(content: old_file_content)
|
171
|
+
file_content = extend_content(file_content, tool_details)
|
91
172
|
|
92
|
-
|
93
|
-
|
94
|
-
new_file_content.concat(autogen_version_warning_text(api_version: api_version))
|
173
|
+
if file_content
|
174
|
+
new_file_content = file_content.join("\n")
|
95
175
|
|
96
176
|
File.write(fastlane_swift_api_path, new_file_content)
|
97
177
|
UI.success(fastlane_swift_api_path)
|
@@ -359,13 +439,17 @@ func parseInt(fromString: String, function: String = #function) -> Int {
|
|
359
439
|
if self.tools_option_files.include?(action_name.to_s.downcase)
|
360
440
|
tool_swift_function = ToolSwiftFunction.new(
|
361
441
|
action_name: action_name,
|
442
|
+
action_description: action.description,
|
443
|
+
action_details: action.details,
|
362
444
|
keys: keys,
|
363
445
|
key_descriptions: key_descriptions,
|
364
446
|
key_default_values: key_default_values,
|
365
447
|
key_optionality_values: key_optionality_values,
|
366
448
|
key_type_overrides: key_type_overrides,
|
367
449
|
key_is_strings: key_is_strings,
|
368
|
-
return_type: action_return_type
|
450
|
+
return_type: action_return_type,
|
451
|
+
return_value: action.return_value,
|
452
|
+
sample_return_value: action.sample_return_value
|
369
453
|
)
|
370
454
|
generated_protocol_file_path = generate_tool_protocol(tool_swift_function: tool_swift_function)
|
371
455
|
self.generated_paths << generated_protocol_file_path unless generated_protocol_file_path.nil?
|
@@ -373,13 +457,17 @@ func parseInt(fromString: String, function: String = #function) -> Int {
|
|
373
457
|
else
|
374
458
|
return SwiftFunction.new(
|
375
459
|
action_name: action_name,
|
460
|
+
action_description: action.description,
|
461
|
+
action_details: action.details,
|
376
462
|
keys: keys,
|
377
463
|
key_descriptions: key_descriptions,
|
378
464
|
key_default_values: key_default_values,
|
379
465
|
key_optionality_values: key_optionality_values,
|
380
466
|
key_type_overrides: key_type_overrides,
|
381
467
|
key_is_strings: key_is_strings,
|
382
|
-
return_type: action_return_type
|
468
|
+
return_type: action_return_type,
|
469
|
+
return_value: action.return_value,
|
470
|
+
sample_return_value: action.sample_return_value
|
383
471
|
)
|
384
472
|
end
|
385
473
|
end
|
@@ -1,7 +1,11 @@
|
|
1
1
|
module Fastlane
|
2
2
|
class SwiftFunction
|
3
3
|
attr_accessor :function_name
|
4
|
+
attr_accessor :function_description
|
5
|
+
attr_accessor :function_details
|
4
6
|
attr_accessor :return_type
|
7
|
+
attr_accessor :return_value
|
8
|
+
attr_accessor :sample_return_value
|
5
9
|
attr_accessor :param_names
|
6
10
|
attr_accessor :param_descriptions
|
7
11
|
attr_accessor :param_default_values
|
@@ -11,14 +15,18 @@ module Fastlane
|
|
11
15
|
attr_accessor :reserved_words
|
12
16
|
attr_accessor :default_values_to_ignore
|
13
17
|
|
14
|
-
def initialize(action_name: nil, keys: nil, key_descriptions: nil, key_default_values: nil, key_optionality_values: nil, key_type_overrides: nil, key_is_strings: nil, return_type: nil)
|
18
|
+
def initialize(action_name: nil, action_description: nil, action_details: nil, keys: nil, key_descriptions: nil, key_default_values: nil, key_optionality_values: nil, key_type_overrides: nil, key_is_strings: nil, return_type: nil, return_value: nil, sample_return_value: nil)
|
15
19
|
@function_name = action_name
|
20
|
+
@function_description = action_description
|
21
|
+
@function_details = action_details
|
16
22
|
@param_names = keys
|
17
23
|
@param_descriptions = key_descriptions
|
18
24
|
@param_default_values = key_default_values
|
19
25
|
@param_optionality_values = key_optionality_values
|
20
26
|
@param_is_strings = key_is_strings
|
21
27
|
@return_type = return_type
|
28
|
+
@return_value = non_empty(string: return_value)
|
29
|
+
@sample_return_value = non_empty(string: sample_return_value)
|
22
30
|
@param_type_overrides = key_type_overrides
|
23
31
|
|
24
32
|
# rubocop:disable LineLength
|
@@ -34,6 +42,14 @@ module Fastlane
|
|
34
42
|
return "`#{word}`"
|
35
43
|
end
|
36
44
|
|
45
|
+
def non_empty(string: nil)
|
46
|
+
if string.nil? || string.to_s.empty?
|
47
|
+
return nil
|
48
|
+
else
|
49
|
+
return string
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
37
53
|
def return_declaration
|
38
54
|
expected_type = swift_type_for_return_type
|
39
55
|
unless expected_type.to_s.length > 0
|
@@ -178,7 +194,54 @@ module Fastlane
|
|
178
194
|
indent = ' ' * (discardable_result.length + function_name.length + function_keyword_definition.length + open_paren.length)
|
179
195
|
params = self.parameters.join(",\n#{indent}")
|
180
196
|
|
181
|
-
return "#{discardable_result}#{function_keyword_definition}#{function_name}#{open_paren}#{params}#{closed_paren}#{function_return_declaration} {\n#{self.implementation}\n}"
|
197
|
+
return "#{swift_documentation}#{discardable_result}#{function_keyword_definition}#{function_name}#{open_paren}#{params}#{closed_paren}#{function_return_declaration} {\n#{self.implementation}\n}\n"
|
198
|
+
end
|
199
|
+
|
200
|
+
def swift_documentation
|
201
|
+
has_parameters = @param_names && @param_names.length > 0
|
202
|
+
unless @function_description || @function_details || has_parameters
|
203
|
+
return ''
|
204
|
+
end
|
205
|
+
|
206
|
+
description = " #{fix_documentation_indentation(string: @function_description)}" if @function_description
|
207
|
+
details = " #{fix_documentation_indentation(string: @function_details)}" if @function_details
|
208
|
+
separator = ''
|
209
|
+
documentation_elements = [description, swift_parameter_documentation, swift_return_value_documentation, details].compact
|
210
|
+
# Adds newlines between each documentation element.
|
211
|
+
documentation = documentation_elements.flat_map { |element| [element, separator] }.tap(&:pop).join("\n")
|
212
|
+
|
213
|
+
return "/**\n#{documentation}\n*/\n"
|
214
|
+
end
|
215
|
+
|
216
|
+
def swift_parameter_documentation
|
217
|
+
unless @param_names && @param_names.length > 0
|
218
|
+
return nil
|
219
|
+
end
|
220
|
+
|
221
|
+
names_and_descriptions = @param_names.zip(@param_descriptions)
|
222
|
+
|
223
|
+
if @param_names.length == 1
|
224
|
+
detail_strings = names_and_descriptions.map { |name, description| " - parameter #{camel_case_lower(string: name)}: #{description}" }
|
225
|
+
return detail_strings.first
|
226
|
+
else
|
227
|
+
detail_strings = names_and_descriptions.map { |name, description| " - #{camel_case_lower(string: name)}: #{description}" }
|
228
|
+
return " - parameters:\n#{detail_strings.join("\n")}"
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
def swift_return_value_documentation
|
233
|
+
unless @return_value
|
234
|
+
return nil
|
235
|
+
end
|
236
|
+
|
237
|
+
sample = ". Example: #{@sample_return_value}" if @sample_return_value
|
238
|
+
|
239
|
+
return " - returns: #{return_value}#{sample}"
|
240
|
+
end
|
241
|
+
|
242
|
+
def fix_documentation_indentation(string: nil)
|
243
|
+
indent = ' '
|
244
|
+
string.gsub("\n", "\n#{indent}")
|
182
245
|
end
|
183
246
|
|
184
247
|
def build_argument_list
|
@@ -248,12 +311,18 @@ module Fastlane
|
|
248
311
|
unless @param_names
|
249
312
|
return []
|
250
313
|
end
|
251
|
-
swift_vars = @param_names.zip(param_default_values, param_optionality_values, param_type_overrides).map do |param, default_value, optional, param_type_override|
|
314
|
+
swift_vars = @param_names.zip(param_default_values, param_optionality_values, param_type_overrides, param_descriptions).map do |param, default_value, optional, param_type_override, param_description|
|
252
315
|
type = get_type(param: param, default_value: default_value, optional: optional, param_type_override: param_type_override)
|
253
316
|
|
254
317
|
param = camel_case_lower(string: param)
|
255
318
|
param = sanitize_reserved_word(word: param)
|
256
319
|
static_var_for_parameter_name = param
|
320
|
+
|
321
|
+
if param_description
|
322
|
+
documentation = " /// #{param_description}\n"
|
323
|
+
end
|
324
|
+
|
325
|
+
"\n#{documentation}"\
|
257
326
|
" var #{static_var_for_parameter_name}: #{type} { get }"
|
258
327
|
end
|
259
328
|
|
@@ -90,6 +90,10 @@ module Fastlane
|
|
90
90
|
source_file_content = File.read(source)
|
91
91
|
target_file_content = File.read(target)
|
92
92
|
|
93
|
+
# ignore if files don't contain FastlaneRunnerAPIVersion
|
94
|
+
return false unless source_file_content.include?("FastlaneRunnerAPIVersion")
|
95
|
+
return false unless target_file_content.include?("FastlaneRunnerAPIVersion")
|
96
|
+
|
93
97
|
bundled_version = source_file_content.match(regex_to_use)[1]
|
94
98
|
target_version = target_file_content.match(regex_to_use)[1]
|
95
99
|
file_versions_are_different = bundled_version != target_version
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// This class is automatically included in FastlaneRunner during build
|
2
|
+
|
3
|
+
// This autogenerated file will be overwritten or replaced when running "fastlane generate_swift"
|
4
|
+
//
|
5
|
+
// ** NOTE **
|
6
|
+
// This file is provided by fastlane and WILL be overwritten in future updates
|
7
|
+
// If you want to add extra functionality to this project, create a new file in a
|
8
|
+
// new group so that it won't be marked for upgrade
|
9
|
+
//
|
10
|
+
|
11
|
+
import Foundation
|
12
|
+
|
13
|
+
// Please don't remove the lines below
|
14
|
+
// They are used to detect outdated files
|
15
|
+
// FastlaneRunnerAPIVersion [0.9.56]
|
@@ -1,63 +1,183 @@
|
|
1
1
|
protocol DeliverfileProtocol: class {
|
2
|
+
|
3
|
+
/// Your Apple ID Username
|
2
4
|
var username: String { get }
|
5
|
+
|
6
|
+
/// The bundle identifier of your app
|
3
7
|
var appIdentifier: String? { get }
|
8
|
+
|
9
|
+
/// The version that should be edited or created
|
4
10
|
var appVersion: String? { get }
|
11
|
+
|
12
|
+
/// Path to your ipa file
|
5
13
|
var ipa: String? { get }
|
14
|
+
|
15
|
+
/// Path to your pkg file
|
6
16
|
var pkg: String? { get }
|
17
|
+
|
18
|
+
/// If set the given build number (already uploaded to iTC) will be used instead of the current built one
|
7
19
|
var buildNumber: String? { get }
|
20
|
+
|
21
|
+
/// The platform to use (optional)
|
8
22
|
var platform: String { get }
|
23
|
+
|
24
|
+
/// Modify live metadata, this option disables ipa upload and screenshot upload
|
9
25
|
var editLive: Bool { get }
|
26
|
+
|
27
|
+
/// Force usage of live version rather than edit version
|
10
28
|
var useLiveVersion: Bool { get }
|
29
|
+
|
30
|
+
/// Path to the folder containing the metadata files
|
11
31
|
var metadataPath: String? { get }
|
32
|
+
|
33
|
+
/// Path to the folder containing the screenshots
|
12
34
|
var screenshotsPath: String? { get }
|
35
|
+
|
36
|
+
/// Skip uploading an ipa or pkg to App Store Connect
|
13
37
|
var skipBinaryUpload: Bool { get }
|
38
|
+
|
39
|
+
/// Don't upload the screenshots
|
14
40
|
var skipScreenshots: Bool { get }
|
41
|
+
|
42
|
+
/// Don't upload the metadata (e.g. title, description). This will still upload screenshots
|
15
43
|
var skipMetadata: Bool { get }
|
44
|
+
|
45
|
+
/// Don't update app version for submission
|
16
46
|
var skipAppVersionUpdate: Bool { get }
|
47
|
+
|
48
|
+
/// Skip the HTML report file verification
|
17
49
|
var force: Bool { get }
|
50
|
+
|
51
|
+
/// Clear all previously uploaded screenshots before uploading the new ones
|
18
52
|
var overwriteScreenshots: Bool { get }
|
53
|
+
|
54
|
+
/// Submit the new version for Review after uploading everything
|
19
55
|
var submitForReview: Bool { get }
|
56
|
+
|
57
|
+
/// Rejects the previously submitted build if it's in a state where it's possible
|
20
58
|
var rejectIfPossible: Bool { get }
|
59
|
+
|
60
|
+
/// Should the app be automatically released once it's approved?
|
21
61
|
var automaticRelease: Bool { get }
|
62
|
+
|
63
|
+
/// Date in milliseconds for automatically releasing on pending approval
|
22
64
|
var autoReleaseDate: String? { get }
|
65
|
+
|
66
|
+
/// Enable the phased release feature of iTC
|
23
67
|
var phasedRelease: Bool { get }
|
68
|
+
|
69
|
+
/// Reset the summary rating when you release a new version of the application
|
24
70
|
var resetRatings: Bool { get }
|
71
|
+
|
72
|
+
/// The price tier of this application
|
25
73
|
var priceTier: String? { get }
|
74
|
+
|
75
|
+
/// Path to the app rating's config
|
26
76
|
var appRatingConfigPath: String? { get }
|
77
|
+
|
78
|
+
/// Extra information for the submission (e.g. compliance specifications, IDFA settings)
|
27
79
|
var submissionInformation: String? { get }
|
80
|
+
|
81
|
+
/// The ID of your App Store Connect team if you're in multiple teams
|
28
82
|
var teamId: String? { get }
|
83
|
+
|
84
|
+
/// The name of your App Store Connect team if you're in multiple teams
|
29
85
|
var teamName: String? { get }
|
86
|
+
|
87
|
+
/// The short ID of your Developer Portal team, if you're in multiple teams. Different from your iTC team ID!
|
30
88
|
var devPortalTeamId: String? { get }
|
89
|
+
|
90
|
+
/// The name of your Developer Portal team if you're in multiple teams
|
31
91
|
var devPortalTeamName: String? { get }
|
92
|
+
|
93
|
+
/// The provider short name to be used with the iTMSTransporter to identify your team. This value will override the automatically detected provider short name. To get provider short name run `pathToXcode.app/Contents/Applications/Application\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column
|
32
94
|
var itcProvider: String? { get }
|
95
|
+
|
96
|
+
/// Run precheck before submitting to app review
|
33
97
|
var runPrecheckBeforeSubmit: Bool { get }
|
98
|
+
|
99
|
+
/// The default precheck rule level unless otherwise configured
|
34
100
|
var precheckDefaultRuleLevel: String { get }
|
101
|
+
|
102
|
+
/// An array of localized metadata items to upload individually by language so that errors can be identified. E.g. ['name', 'keywords', 'description']. Note: slow
|
35
103
|
var individualMetadataItems: [String] { get }
|
104
|
+
|
105
|
+
/// Metadata: The path to the app icon
|
36
106
|
var appIcon: String? { get }
|
107
|
+
|
108
|
+
/// Metadata: The path to the Apple Watch app icon
|
37
109
|
var appleWatchAppIcon: String? { get }
|
110
|
+
|
111
|
+
/// Metadata: The copyright notice
|
38
112
|
var copyright: String? { get }
|
113
|
+
|
114
|
+
/// Metadata: The english name of the primary category (e.g. `Business`, `Books`)
|
39
115
|
var primaryCategory: String? { get }
|
116
|
+
|
117
|
+
/// Metadata: The english name of the secondary category (e.g. `Business`, `Books`)
|
40
118
|
var secondaryCategory: String? { get }
|
119
|
+
|
120
|
+
/// Metadata: The english name of the primary first sub category (e.g. `Educational`, `Puzzle`)
|
41
121
|
var primaryFirstSubCategory: String? { get }
|
122
|
+
|
123
|
+
/// Metadata: The english name of the primary second sub category (e.g. `Educational`, `Puzzle`)
|
42
124
|
var primarySecondSubCategory: String? { get }
|
125
|
+
|
126
|
+
/// Metadata: The english name of the secondary first sub category (e.g. `Educational`, `Puzzle`)
|
43
127
|
var secondaryFirstSubCategory: String? { get }
|
128
|
+
|
129
|
+
/// Metadata: The english name of the secondary second sub category (e.g. `Educational`, `Puzzle`)
|
44
130
|
var secondarySecondSubCategory: String? { get }
|
131
|
+
|
132
|
+
/// Metadata: A hash containing the trade representative contact information
|
45
133
|
var tradeRepresentativeContactInformation: [String : Any]? { get }
|
134
|
+
|
135
|
+
/// Metadata: A hash containing the review information
|
46
136
|
var appReviewInformation: [String : Any]? { get }
|
137
|
+
|
138
|
+
/// Metadata: Path to the app review attachment file
|
47
139
|
var appReviewAttachmentFile: String? { get }
|
140
|
+
|
141
|
+
/// Metadata: The localised app description
|
48
142
|
var description: String? { get }
|
143
|
+
|
144
|
+
/// Metadata: The localised app name
|
49
145
|
var name: String? { get }
|
146
|
+
|
147
|
+
/// Metadata: The localised app subtitle
|
50
148
|
var subtitle: [String : Any]? { get }
|
149
|
+
|
150
|
+
/// Metadata: An array of localised keywords
|
51
151
|
var keywords: [String : Any]? { get }
|
152
|
+
|
153
|
+
/// Metadata: An array of localised promotional texts
|
52
154
|
var promotionalText: [String : Any]? { get }
|
155
|
+
|
156
|
+
/// Metadata: Localised release notes for this version
|
53
157
|
var releaseNotes: String? { get }
|
158
|
+
|
159
|
+
/// Metadata: Localised privacy url
|
54
160
|
var privacyUrl: String? { get }
|
161
|
+
|
162
|
+
/// Metadata: Localised Apple TV privacy policy text
|
55
163
|
var appleTvPrivacyPolicy: String? { get }
|
164
|
+
|
165
|
+
/// Metadata: Localised support url
|
56
166
|
var supportUrl: String? { get }
|
167
|
+
|
168
|
+
/// Metadata: Localised marketing url
|
57
169
|
var marketingUrl: String? { get }
|
170
|
+
|
171
|
+
/// Metadata: List of languages to activate
|
58
172
|
var languages: [String]? { get }
|
173
|
+
|
174
|
+
/// Ignore errors when invalid languages are found in metadata and screenshot directories
|
59
175
|
var ignoreLanguageDirectoryValidation: Bool { get }
|
176
|
+
|
177
|
+
/// Should precheck check in-app purchases?
|
60
178
|
var precheckIncludeInAppPurchases: Bool { get }
|
179
|
+
|
180
|
+
/// The (spaceship) app ID of the app you want to use/modify
|
61
181
|
var app: String { get }
|
62
182
|
}
|
63
183
|
|
@@ -126,4 +246,4 @@ extension DeliverfileProtocol {
|
|
126
246
|
|
127
247
|
// Please don't remove the lines below
|
128
248
|
// They are used to detect outdated files
|
129
|
-
// FastlaneRunnerAPIVersion [0.9.
|
249
|
+
// FastlaneRunnerAPIVersion [0.9.18]
|