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
@@ -29,8 +29,8 @@ module Fastlane
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.available_options
|
32
|
-
# Define all options your action supports.
|
33
|
-
|
32
|
+
# Define all options your action supports.
|
33
|
+
|
34
34
|
# Below a few examples
|
35
35
|
[
|
36
36
|
FastlaneCore::ConfigItem.new(key: :api_token,
|
@@ -67,13 +67,13 @@ module Fastlane
|
|
67
67
|
|
68
68
|
def self.is_supported?(platform)
|
69
69
|
# you can do things like
|
70
|
-
#
|
70
|
+
#
|
71
71
|
# true
|
72
|
-
#
|
72
|
+
#
|
73
73
|
# platform == :ios
|
74
|
-
#
|
74
|
+
#
|
75
75
|
# [:ios, :mac].include?(platform)
|
76
|
-
#
|
76
|
+
#
|
77
77
|
|
78
78
|
platform == :ios
|
79
79
|
end
|
@@ -3,6 +3,8 @@ module Fastlane
|
|
3
3
|
module Actions
|
4
4
|
class AutomaticCodeSigningAction < Action
|
5
5
|
def self.run(params)
|
6
|
+
UI.deprecated("The `automatic_code_signing` action has been deprecated,")
|
7
|
+
UI.deprecated("Please use `update_code_signing_settings` action instead.")
|
6
8
|
FastlaneCore::PrintTable.print_values(config: params, title: "Summary for Automatic Codesigning")
|
7
9
|
path = params[:path]
|
8
10
|
path = File.join(File.expand_path(path), "project.pbxproj")
|
@@ -201,7 +203,11 @@ module Fastlane
|
|
201
203
|
end
|
202
204
|
|
203
205
|
def self.category
|
204
|
-
:
|
206
|
+
:deprecated
|
207
|
+
end
|
208
|
+
|
209
|
+
def self.deprecated_notes
|
210
|
+
"Please use `update_code_signing_settings` action instead."
|
205
211
|
end
|
206
212
|
|
207
213
|
def self.return_value
|
@@ -66,7 +66,7 @@ module Fastlane
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def self.description
|
69
|
-
"
|
69
|
+
"Refer to [Firebase App Distribution](https://appdistro.page.link/fastlane-repo)"
|
70
70
|
end
|
71
71
|
|
72
72
|
def self.available_options
|
@@ -169,6 +169,10 @@ module Fastlane
|
|
169
169
|
|
170
170
|
def self.details
|
171
171
|
[
|
172
|
+
"Crashlytics Beta has been deprecated and replaced with Firebase App Distribution.",
|
173
|
+
"Beta will continue working until May 4, 2020.",
|
174
|
+
"Check out the [Firebase App Distribution docs](https://github.com/fastlane/fastlane-plugin-firebase_app_distribution) to get started.",
|
175
|
+
"",
|
172
176
|
"Additionally, you can specify `notes`, `emails`, `groups` and `notifications`.",
|
173
177
|
"Distributing to Groups: When using the `groups` parameter, it's important to use the group **alias** names for each group you'd like to distribute to. A group's alias can be found in the web UI. If you're viewing the Beta page, you can open the groups dialog by clicking the 'Manage Groups' button.",
|
174
178
|
"This action uses the `submit` binary provided by the Crashlytics framework. If the binary is not found in its usual path, you'll need to specify the path manually by using the `crashlytics_path` option."
|
@@ -196,7 +200,15 @@ module Fastlane
|
|
196
200
|
end
|
197
201
|
|
198
202
|
def self.category
|
199
|
-
:
|
203
|
+
:deprecated
|
204
|
+
end
|
205
|
+
|
206
|
+
def self.deprecated_notes
|
207
|
+
[
|
208
|
+
"Crashlytics Beta has been deprecated and replaced with Firebase App Distribution.",
|
209
|
+
"Beta will continue working until May 4, 2020.",
|
210
|
+
"Check out the [Firebase App Distribution docs](https://github.com/fastlane/fastlane-plugin-firebase_app_distribution) to get started."
|
211
|
+
].join("\n")
|
200
212
|
end
|
201
213
|
end
|
202
214
|
end
|
@@ -15,6 +15,7 @@ module Fastlane
|
|
15
15
|
'base' => params[:base]
|
16
16
|
}
|
17
17
|
payload['body'] = params[:body] if params[:body]
|
18
|
+
payload['draft'] = params[:draft] if params[:draft]
|
18
19
|
|
19
20
|
GithubApiAction.run(
|
20
21
|
server_url: params[:api_url],
|
@@ -176,6 +177,11 @@ module Fastlane
|
|
176
177
|
description: "The contents of the pull request",
|
177
178
|
is_string: true,
|
178
179
|
optional: true),
|
180
|
+
FastlaneCore::ConfigItem.new(key: :draft,
|
181
|
+
env_name: "GITHUB_PULL_REQUEST_DRAFT",
|
182
|
+
description: "Indicates whether the pull request is a draft",
|
183
|
+
type: Boolean,
|
184
|
+
optional: true),
|
179
185
|
FastlaneCore::ConfigItem.new(key: :labels,
|
180
186
|
env_name: "GITHUB_PULL_REQUEST_LABELS",
|
181
187
|
description: "The labels for the pull request",
|
@@ -226,7 +232,7 @@ module Fastlane
|
|
226
232
|
end
|
227
233
|
|
228
234
|
def self.author
|
229
|
-
["seei", "tommeier", "marumemomo", "elneruda"]
|
235
|
+
["seei", "tommeier", "marumemomo", "elneruda", "kagemiku"]
|
230
236
|
end
|
231
237
|
|
232
238
|
def self.is_supported?(platform)
|
@@ -190,10 +190,16 @@ The `Snapfile` can contain all the options that are also available on `fastlane
|
|
190
190
|
scheme("UITests")
|
191
191
|
|
192
192
|
devices([
|
193
|
-
"
|
194
|
-
"
|
195
|
-
"
|
196
|
-
"
|
193
|
+
"iPad (7th generation)",
|
194
|
+
"iPad Air (3rd generation)",
|
195
|
+
"iPad Pro (11-inch)",
|
196
|
+
"iPad Pro (12.9-inch) (3rd generation)",
|
197
|
+
"iPad Pro (9.7-inch)",
|
198
|
+
"iPhone 11",
|
199
|
+
"iPhone 11 Pro",
|
200
|
+
"iPhone 11 Pro Max",
|
201
|
+
"iPhone 8",
|
202
|
+
"iPhone 8 Plus"
|
197
203
|
])
|
198
204
|
|
199
205
|
languages([
|
@@ -210,6 +216,8 @@ output_directory('./screenshots')
|
|
210
216
|
|
211
217
|
clear_previous_screenshots(true)
|
212
218
|
|
219
|
+
override_status_bar(true)
|
220
|
+
|
213
221
|
add_photos(["MyTestApp/Assets/demo.jpg"])
|
214
222
|
```
|
215
223
|
|
@@ -320,7 +328,7 @@ To get more information about language and locale codes please read [Internation
|
|
320
328
|
|
321
329
|
## Use a clean status bar
|
322
330
|
|
323
|
-
You can
|
331
|
+
You can set `override_status_bar` to `true` to set the status bar to Tuesday January 9th at 9:41AM with full battery and reception.
|
324
332
|
|
325
333
|
## Editing the `Snapfile`
|
326
334
|
|
@@ -329,7 +329,7 @@ Use [_deliver_](https://docs.fastlane.tools/actions/deliver/) to upload iOS scre
|
|
329
329
|
|
330
330
|
## Use a clean status bar
|
331
331
|
|
332
|
-
You can
|
332
|
+
You can set `override_status_bar` to `true` in snapshot to set the status bar to Tuesday January 9th at 9:41AM with full battery and reception.
|
333
333
|
|
334
334
|
## Gray artifacts around text
|
335
335
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
A new approach to iOS code signing: Share one code signing identity across your development team to simplify your codesigning setup and prevent code signing issues.
|
8
8
|
|
9
|
-
_match_ is the implementation of the [codesigning.guide concept](https://codesigning.guide). _match_ creates all required certificates & provisioning profiles and stores them in a separate git repository. Every team member with access to the
|
9
|
+
_match_ is the implementation of the [codesigning.guide concept](https://codesigning.guide). _match_ creates all required certificates & provisioning profiles and stores them in a separate git repository, Google Cloud, or Amazon S3. Every team member with access to the selected storage can use those credentials for code signing. _match_ also automatically repairs broken and expired credentials. It's the easiest way to share signing credentials across teams
|
10
10
|
|
11
11
|
[More information on how to get started with codesigning](https://docs.fastlane.tools/codesigning/getting-started/)
|
12
12
|
|
@@ -465,13 +465,13 @@ You'll be asked for the new password on all your machines on the next run.
|
|
465
465
|
|
466
466
|
### Import
|
467
467
|
|
468
|
-
To import and encrypt a certificate (`.cer`)
|
468
|
+
To import and encrypt a certificate (`.cer`), the private key (`.p12`) and the provisioning profiles (`.mobileprovision` or `.provisionprofile`) into the _match_ repo run:
|
469
469
|
|
470
470
|
```no-highlight
|
471
471
|
fastlane match import
|
472
472
|
```
|
473
473
|
|
474
|
-
You'll be prompted for the certificate (`.cer`)
|
474
|
+
You'll be prompted for the certificate (`.cer`), the private key (`.p12`) and the provisioning profiles (`.mobileprovision` or `.provisionprofile`) paths. _match_ will first validate the certificate (`.cer`) against the Developer Portal before importing the certificate, the private key and the provisioning profiles into the specified _match_ repository.
|
475
475
|
|
476
476
|
### Manual Decrypt
|
477
477
|
|
@@ -82,7 +82,7 @@ module Fastlane
|
|
82
82
|
def self.get_version_number_from_build_settings!(target, variable, configuration = nil)
|
83
83
|
target.build_configurations.each do |config|
|
84
84
|
if configuration.nil? || config.name == configuration
|
85
|
-
value = config.
|
85
|
+
value = config.resolve_build_setting(variable)
|
86
86
|
return value if value
|
87
87
|
end
|
88
88
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
3
|
module SharedValues
|
4
|
-
GIT_BRANCH_ENV_VARS = %w(GIT_BRANCH BRANCH_NAME TRAVIS_BRANCH BITRISE_GIT_BRANCH CI_BUILD_REF_NAME CI_COMMIT_REF_NAME WERCKER_GIT_BRANCH BUILDKITE_BRANCH).freeze
|
4
|
+
GIT_BRANCH_ENV_VARS = %w(GIT_BRANCH BRANCH_NAME TRAVIS_BRANCH BITRISE_GIT_BRANCH CI_BUILD_REF_NAME CI_COMMIT_REF_NAME WERCKER_GIT_BRANCH BUILDKITE_BRANCH APPCENTER_BRANCH).freeze
|
5
5
|
end
|
6
6
|
|
7
7
|
class GitBranchAction < Action
|
@@ -26,6 +26,7 @@ module Fastlane
|
|
26
26
|
command << "--platforms=#{params[:platforms]}" if params[:platforms]
|
27
27
|
command << "--skip-import-validation" if params[:skip_import_validation]
|
28
28
|
command << "--skip-tests" if params[:skip_tests]
|
29
|
+
command << "--analyze" if params[:analyze]
|
29
30
|
|
30
31
|
result = Actions.sh(command.join(' '))
|
31
32
|
UI.success("Pod lib lint Successfully ⬆️ ")
|
@@ -144,7 +145,12 @@ module Fastlane
|
|
144
145
|
description: "Lint skips building and running tests during validation (available since cocoapods >= 1.3)",
|
145
146
|
type: Boolean,
|
146
147
|
default_value: false,
|
147
|
-
env_name: "FL_POD_LIB_LINT_SKIP_TESTS")
|
148
|
+
env_name: "FL_POD_LIB_LINT_SKIP_TESTS"),
|
149
|
+
FastlaneCore::ConfigItem.new(key: :analyze,
|
150
|
+
description: "Validate with the Xcode Static Analysis tool (available since cocoapods >= 1.6.1)",
|
151
|
+
type: Boolean,
|
152
|
+
default_value: false,
|
153
|
+
env_name: "FL_POD_LIB_LINT_ANALYZE")
|
148
154
|
]
|
149
155
|
end
|
150
156
|
|
@@ -8,9 +8,9 @@ module Fastlane
|
|
8
8
|
cmd << ['bundle exec'] if params[:use_bundle_exec] && shell_out_should_use_bundle_exec?
|
9
9
|
cmd << ['pod keys set']
|
10
10
|
|
11
|
-
cmd << ["\"#{params[:key]
|
12
|
-
cmd << ["\"#{params[:value]
|
13
|
-
cmd << ["\"#{params[:project]
|
11
|
+
cmd << ["\"#{params[:key]}\""]
|
12
|
+
cmd << ["\"#{params[:value]}\""]
|
13
|
+
cmd << ["\"#{params[:project]}\""] if params[:project]
|
14
14
|
|
15
15
|
Actions.sh(cmd.join(' '))
|
16
16
|
end
|
@@ -93,7 +93,7 @@ module Fastlane
|
|
93
93
|
env_name: "FL_SETUP_CI_PROVIDER",
|
94
94
|
description: "CI provider. If none is set, the provider is detected automatically",
|
95
95
|
is_string: true,
|
96
|
-
|
96
|
+
optional: true,
|
97
97
|
verify_block: proc do |value|
|
98
98
|
value = value.to_s
|
99
99
|
# Validate both 'travis' and 'circleci' for backwards compatibility, even
|
@@ -14,7 +14,10 @@ module Fastlane
|
|
14
14
|
"SCAN_DERIVED_DATA_PATH",
|
15
15
|
"SCAN_OUTPUT_DIRECTORY",
|
16
16
|
"SCAN_RESULT_BUNDLE",
|
17
|
-
"XCODE_DERIVED_DATA_PATH"
|
17
|
+
"XCODE_DERIVED_DATA_PATH",
|
18
|
+
"MATCH_KEYCHAIN_NAME",
|
19
|
+
"MATCH_KEYCHAIN_PASSWORD",
|
20
|
+
"MATCH_READONLY"
|
18
21
|
].freeze
|
19
22
|
|
20
23
|
def self.run(params)
|
@@ -40,6 +43,9 @@ module Fastlane
|
|
40
43
|
add_to_search_list: params[:add_keychain_to_search_list],
|
41
44
|
set_default: params[:set_default_keychain]
|
42
45
|
)
|
46
|
+
ENV['MATCH_KEYCHAIN_NAME'] ||= keychain_path
|
47
|
+
ENV['MATCH_KEYCHAIN_PASSWORD'] ||= params[:keychain_password]
|
48
|
+
ENV["MATCH_READONLY"] ||= true.to_s
|
43
49
|
end
|
44
50
|
|
45
51
|
# Code signing identity
|
@@ -90,6 +96,7 @@ module Fastlane
|
|
90
96
|
def self.details
|
91
97
|
list = <<-LIST.markdown_list(true)
|
92
98
|
Adds and unlocks keychains from Jenkins 'Keychains and Provisioning Profiles Plugin'
|
99
|
+
Sets unlocked keychain to be used by Match
|
93
100
|
Sets code signing identity from Jenkins 'Keychains and Provisioning Profiles Plugin'
|
94
101
|
Sets output directory to './output' (gym, scan and backup_xcarchive)
|
95
102
|
Sets derived data path to './derivedData' (xcodebuild, gym, scan and clear_derived_data, carthage)
|
@@ -99,7 +106,9 @@ module Fastlane
|
|
99
106
|
[
|
100
107
|
list,
|
101
108
|
"This action helps with Jenkins integration. Creates own derived data for each job. All build results like IPA files and archives will be stored in the `./output` directory.",
|
102
|
-
"The action also works with [Keychains and Provisioning Profiles Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin), the selected keychain will be automatically unlocked and the selected code signing identity will be used.
|
109
|
+
"The action also works with [Keychains and Provisioning Profiles Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin), the selected keychain will be automatically unlocked and the selected code signing identity will be used.",
|
110
|
+
"[Match](https://docs.fastlane.tools/actions/match/) will be also set up to use the unlocked keychain and set in read-only mode, if its environment variables were not yet defined.",
|
111
|
+
"By default this action will only work when _fastlane_ is executed on a CI system."
|
103
112
|
].join("\n")
|
104
113
|
end
|
105
114
|
|
@@ -241,7 +241,7 @@ module Fastlane
|
|
241
241
|
FastlaneCore::ConfigItem.new(key: :ignore,
|
242
242
|
env_name: "FL_SLATHER_IGNORE",
|
243
243
|
description: "Tell slather to ignore files matching a path or any path from an array of paths",
|
244
|
-
|
244
|
+
type: Array,
|
245
245
|
optional: true),
|
246
246
|
FastlaneCore::ConfigItem.new(key: :verbose,
|
247
247
|
env_name: "FL_SLATHER_VERBOSE",
|
@@ -13,13 +13,7 @@ module Fastlane
|
|
13
13
|
|
14
14
|
command = (params[:executable] || "swiftlint").dup
|
15
15
|
command << " #{params[:mode]}"
|
16
|
-
command <<
|
17
|
-
command << supported_option_switch(params, :strict, "0.9.2", true)
|
18
|
-
command << " --config #{params[:config_file].shellescape}" if params[:config_file]
|
19
|
-
command << " --reporter #{params[:reporter]}" if params[:reporter]
|
20
|
-
command << supported_option_switch(params, :quiet, "0.9.0", true)
|
21
|
-
command << supported_option_switch(params, :format, "0.11.0", true) if params[:mode] == :autocorrect
|
22
|
-
command << " --compiler-log-path #{params[:compiler_log_path].shellescape}" if params[:compiler_log_path]
|
16
|
+
command << optional_flags(params)
|
23
17
|
|
24
18
|
if params[:files]
|
25
19
|
if version < Gem::Version.new('0.5.1')
|
@@ -41,12 +35,33 @@ module Fastlane
|
|
41
35
|
end
|
42
36
|
end
|
43
37
|
|
38
|
+
def self.optional_flags(params)
|
39
|
+
command = ""
|
40
|
+
command << " --path #{params[:path].shellescape}" if params[:path]
|
41
|
+
command << supported_option_switch(params, :strict, "0.9.2", true)
|
42
|
+
command << " --config #{params[:config_file].shellescape}" if params[:config_file]
|
43
|
+
command << " --reporter #{params[:reporter]}" if params[:reporter]
|
44
|
+
command << supported_option_switch(params, :quiet, "0.9.0", true)
|
45
|
+
command << supported_option_switch(params, :format, "0.11.0", true) if params[:mode] == :autocorrect
|
46
|
+
command << supported_no_cache_option(params) if params[:no_cache]
|
47
|
+
command << " --compiler-log-path #{params[:compiler_log_path].shellescape}" if params[:compiler_log_path]
|
48
|
+
return command
|
49
|
+
end
|
50
|
+
|
44
51
|
# Get current SwiftLint version
|
45
52
|
def self.swiftlint_version(executable: nil)
|
46
53
|
binary = executable || 'swiftlint'
|
47
54
|
Gem::Version.new(`#{binary} version`.chomp)
|
48
55
|
end
|
49
56
|
|
57
|
+
def self.supported_no_cache_option(params)
|
58
|
+
if params[:mode] == :autocorrect || params[:mode] == :lint
|
59
|
+
return " --no-cache"
|
60
|
+
else
|
61
|
+
return ""
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
50
65
|
# Return "--option" switch if option is on and current SwiftLint version is greater or equal than min version.
|
51
66
|
# Return "" otherwise.
|
52
67
|
def self.supported_option_switch(params, option, min_version, can_ignore = false)
|
@@ -139,6 +154,12 @@ module Fastlane
|
|
139
154
|
is_string: false,
|
140
155
|
type: Boolean,
|
141
156
|
optional: true),
|
157
|
+
FastlaneCore::ConfigItem.new(key: :no_cache,
|
158
|
+
description: "Ignore the cache when mode is :autocorrect or :lint",
|
159
|
+
default_value: false,
|
160
|
+
is_string: false,
|
161
|
+
type: Boolean,
|
162
|
+
optional: true),
|
142
163
|
FastlaneCore::ConfigItem.new(key: :compiler_log_path,
|
143
164
|
description: "Compiler log path when mode is :analyze",
|
144
165
|
is_string: true,
|
@@ -2,6 +2,8 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
module SharedValues
|
4
4
|
TESTFAIRY_BUILD_URL = :TESTFAIRY_BUILD_URL
|
5
|
+
TESTFAIRY_DOWNLOAD_URL = :TESTFAIRY_DOWNLOAD_URL
|
6
|
+
TESTFAIRY_LANDING_PAGE = :TESTFAIRY_LANDING_PAGE
|
5
7
|
end
|
6
8
|
|
7
9
|
class TestfairyAction < Action
|
@@ -107,6 +109,8 @@ module Fastlane
|
|
107
109
|
response = self.upload_build(params[:upload_url], path, client_options, params[:timeout])
|
108
110
|
if parse_response(response)
|
109
111
|
UI.success("Build URL: #{Actions.lane_context[SharedValues::TESTFAIRY_BUILD_URL]}")
|
112
|
+
UI.success("Download URL: #{Actions.lane_context[SharedValues::TESTFAIRY_DOWNLOAD_URL]}")
|
113
|
+
UI.success("Landing Page URL: #{Actions.lane_context[SharedValues::TESTFAIRY_LANDING_PAGE]}")
|
110
114
|
UI.success("Build successfully uploaded to TestFairy.")
|
111
115
|
else
|
112
116
|
UI.user_error!("Error when trying to upload ipa to TestFairy")
|
@@ -120,8 +124,12 @@ module Fastlane
|
|
120
124
|
def self.parse_response(response)
|
121
125
|
if response.body && response.body.key?('status') && response.body['status'] == 'ok'
|
122
126
|
build_url = response.body['build_url']
|
127
|
+
app_url = response.body['app_url']
|
128
|
+
landing_page_url = response.body['landing_page_url']
|
123
129
|
|
124
130
|
Actions.lane_context[SharedValues::TESTFAIRY_BUILD_URL] = build_url
|
131
|
+
Actions.lane_context[SharedValues::TESTFAIRY_DOWNLOAD_URL] = app_url
|
132
|
+
Actions.lane_context[SharedValues::TESTFAIRY_LANDING_PAGE] = landing_page_url
|
125
133
|
|
126
134
|
return true
|
127
135
|
else
|
@@ -244,7 +252,12 @@ module Fastlane
|
|
244
252
|
api_key: "...",
|
245
253
|
ipa: "./ipa_file.ipa",
|
246
254
|
comment: "Build #{lane_context[SharedValues::BUILD_NUMBER]}",
|
247
|
-
)'
|
255
|
+
)',
|
256
|
+
'testfairy(
|
257
|
+
api_key: "...",
|
258
|
+
apk: "../build/app/outputs/apk/qa/release/app-qa-release.apk",
|
259
|
+
comment: "Build #{lane_context[SharedValues::BUILD_NUMBER]}",
|
260
|
+
)'
|
248
261
|
]
|
249
262
|
end
|
250
263
|
|
@@ -254,12 +267,14 @@ module Fastlane
|
|
254
267
|
|
255
268
|
def self.output
|
256
269
|
[
|
257
|
-
['TESTFAIRY_BUILD_URL', 'URL of the newly uploaded build']
|
270
|
+
['TESTFAIRY_BUILD_URL', 'URL for the sessions of the newly uploaded build'],
|
271
|
+
['TESTFAIRY_DOWNLOAD_URL', 'URL directly to the newly uploaded build'],
|
272
|
+
['TESTFAIRY_LANDING_PAGE', 'URL of the build\'s landing page']
|
258
273
|
]
|
259
274
|
end
|
260
275
|
|
261
276
|
def self.authors
|
262
|
-
["taka0125", "tcurdt", "vijaysharm"]
|
277
|
+
["taka0125", "tcurdt", "vijaysharm", "cdm2012"]
|
263
278
|
end
|
264
279
|
|
265
280
|
def self.is_supported?(platform)
|