fastlane 1.66.0 → 1.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +37 -38
- data/lib/assets/AppfileTemplate +1 -1
- data/lib/assets/DefaultFastfileTemplate +2 -2
- data/lib/assets/FastfileTemplateAndroid +2 -2
- data/lib/assets/custom_action_template.rb +1 -1
- data/lib/fastlane/actions/actions_helper.rb +2 -2
- data/lib/fastlane/actions/appetize.rb +15 -16
- data/lib/fastlane/actions/appium.rb +1 -1
- data/lib/fastlane/actions/appledoc.rb +3 -3
- data/lib/fastlane/actions/artifactory.rb +7 -7
- data/lib/fastlane/actions/backup_file.rb +1 -1
- data/lib/fastlane/actions/backup_xcarchive.rb +1 -1
- data/lib/fastlane/actions/bundle_install.rb +2 -2
- data/lib/fastlane/actions/cert.rb +1 -1
- data/lib/fastlane/actions/changelog_from_git_commits.rb +2 -2
- data/lib/fastlane/actions/chatwork.rb +2 -2
- data/lib/fastlane/actions/clean_build_artifacts.rb +3 -2
- data/lib/fastlane/actions/clean_cocoapods_cache.rb +1 -1
- data/lib/fastlane/actions/clear_derived_data.rb +2 -2
- data/lib/fastlane/actions/clipboard.rb +1 -1
- data/lib/fastlane/actions/commit_version_bump.rb +3 -3
- data/lib/fastlane/actions/copy_artifacts.rb +2 -2
- data/lib/fastlane/actions/crashlytics.rb +6 -6
- data/lib/fastlane/actions/create_pull_request.rb +3 -3
- data/lib/fastlane/actions/deploygate.rb +6 -6
- data/lib/fastlane/actions/dotgpg_environment.rb +1 -1
- data/lib/fastlane/actions/download.rb +1 -1
- data/lib/fastlane/actions/download_dsyms.rb +117 -0
- data/lib/fastlane/actions/ensure_git_branch.rb +1 -1
- data/lib/fastlane/actions/ensure_git_status_clean.rb +1 -1
- data/lib/fastlane/actions/ensure_no_debug_code.rb +26 -12
- data/lib/fastlane/actions/ensure_xcode_version.rb +3 -3
- data/lib/fastlane/actions/erb.rb +1 -1
- data/lib/fastlane/actions/fastlane_version.rb +1 -1
- data/lib/fastlane/actions/frameit.rb +1 -1
- data/lib/fastlane/actions/gcovr.rb +2 -2
- data/lib/fastlane/actions/get_build_number.rb +1 -1
- data/lib/fastlane/actions/get_github_release.rb +6 -6
- data/lib/fastlane/actions/get_info_plist_value.rb +2 -2
- data/lib/fastlane/actions/get_ipa_info_plist_value.rb +2 -2
- data/lib/fastlane/actions/get_version_number.rb +1 -1
- data/lib/fastlane/actions/git_add.rb +1 -1
- data/lib/fastlane/actions/git_commit.rb +1 -1
- data/lib/fastlane/actions/gradle.rb +2 -2
- data/lib/fastlane/actions/gym.rb +1 -1
- data/lib/fastlane/actions/hg_add_tag.rb +1 -1
- data/lib/fastlane/actions/hg_commit_version_bump.rb +3 -3
- data/lib/fastlane/actions/hg_ensure_clean_status.rb +1 -1
- data/lib/fastlane/actions/hg_push.rb +1 -1
- data/lib/fastlane/actions/hipchat.rb +4 -6
- data/lib/fastlane/actions/hockey.rb +4 -4
- data/lib/fastlane/actions/ifttt.rb +74 -0
- data/lib/fastlane/actions/increment_build_number.rb +1 -1
- data/lib/fastlane/actions/increment_version_number.rb +3 -3
- data/lib/fastlane/actions/install_on_device.rb +1 -1
- data/lib/fastlane/actions/install_xcode_plugin.rb +2 -2
- data/lib/fastlane/actions/installr.rb +2 -2
- data/lib/fastlane/actions/ipa.rb +8 -8
- data/lib/fastlane/actions/latest_testflight_build_number.rb +3 -3
- data/lib/fastlane/actions/lcov.rb +1 -1
- data/lib/fastlane/actions/mailgun.rb +1 -1
- data/lib/fastlane/actions/match.rb +2 -2
- data/lib/fastlane/actions/notify.rb +1 -1
- data/lib/fastlane/actions/oclint.rb +2 -2
- data/lib/fastlane/actions/onesignal.rb +3 -3
- data/lib/fastlane/actions/opt_out_usage.rb +1 -1
- data/lib/fastlane/actions/pilot.rb +1 -1
- data/lib/fastlane/actions/pod_push.rb +2 -2
- data/lib/fastlane/actions/produce.rb +1 -1
- data/lib/fastlane/actions/prompt.rb +3 -3
- data/lib/fastlane/actions/push_git_tags.rb +1 -1
- data/lib/fastlane/actions/push_to_git_remote.rb +1 -1
- data/lib/fastlane/actions/read_podspec.rb +1 -1
- data/lib/fastlane/actions/recreate_schemes.rb +1 -1
- data/lib/fastlane/actions/register_devices.rb +2 -2
- data/lib/fastlane/actions/reset_git_repo.rb +3 -3
- data/lib/fastlane/actions/resign.rb +7 -2
- data/lib/fastlane/actions/restore_file.rb +1 -1
- data/lib/fastlane/actions/rocket.rb +64 -0
- data/lib/fastlane/actions/s3.rb +33 -101
- data/lib/fastlane/actions/scan.rb +1 -1
- data/lib/fastlane/actions/scp.rb +2 -2
- data/lib/fastlane/actions/set_changelog.rb +12 -12
- data/lib/fastlane/actions/set_github_release.rb +14 -14
- data/lib/fastlane/actions/set_info_plist_value.rb +2 -2
- data/lib/fastlane/actions/sigh.rb +1 -1
- data/lib/fastlane/actions/slack.rb +2 -2
- data/lib/fastlane/actions/ssh.rb +4 -4
- data/lib/fastlane/actions/supply.rb +1 -1
- data/lib/fastlane/actions/team_id.rb +1 -1
- data/lib/fastlane/actions/team_name.rb +1 -1
- data/lib/fastlane/actions/testfairy.rb +4 -4
- data/lib/fastlane/actions/testmunk.rb +3 -3
- data/lib/fastlane/actions/tryouts.rb +3 -3
- data/lib/fastlane/actions/twitter.rb +1 -1
- data/lib/fastlane/actions/typetalk.rb +1 -1
- data/lib/fastlane/actions/update_app_group_identifiers.rb +4 -4
- data/lib/fastlane/actions/update_app_identifier.rb +4 -4
- data/lib/fastlane/actions/update_fastlane.rb +22 -13
- data/lib/fastlane/actions/update_info_plist.rb +4 -4
- data/lib/fastlane/actions/update_project_code_signing.rb +5 -5
- data/lib/fastlane/actions/update_project_provisioning.rb +10 -10
- data/lib/fastlane/actions/update_project_team.rb +2 -2
- data/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +104 -0
- data/lib/fastlane/actions/upload_symbols_to_sentry.rb +119 -0
- data/lib/fastlane/actions/verify_pod_keys.rb +2 -2
- data/lib/fastlane/actions/verify_xcode.rb +10 -10
- data/lib/fastlane/actions/xcode_install.rb +2 -2
- data/lib/fastlane/actions/xcode_select.rb +1 -1
- data/lib/fastlane/actions/xcode_server_get_assets.rb +8 -8
- data/lib/fastlane/actions/xcodebuild.rb +7 -7
- data/lib/fastlane/actions/xcov.rb +6 -0
- data/lib/fastlane/actions/xctool.rb +2 -2
- data/lib/fastlane/command_line_handler.rb +1 -1
- data/lib/fastlane/configuration_helper.rb +2 -2
- data/lib/fastlane/core_ext/bundler_monkey_patch.rb +14 -0
- data/lib/fastlane/core_ext/string.rb +4 -4
- data/lib/fastlane/documentation/actions_list.rb +2 -2
- data/lib/fastlane/documentation/docs_generator.rb +3 -3
- data/lib/fastlane/fast_file.rb +6 -6
- data/lib/fastlane/helper/crashlytics_helper.rb +1 -1
- data/lib/fastlane/helper/git_helper.rb +2 -2
- data/lib/fastlane/one_off.rb +1 -1
- data/lib/fastlane/runner.rb +1 -1
- data/lib/fastlane/setup/setup.rb +7 -7
- data/lib/fastlane/setup/setup_android.rb +13 -13
- data/lib/fastlane/setup/setup_ios.rb +24 -27
- data/lib/fastlane/version.rb +1 -1
- metadata +66 -32
@@ -3,9 +3,9 @@ module Fastlane
|
|
3
3
|
class ClearDerivedDataAction < Action
|
4
4
|
def self.run(options)
|
5
5
|
path = File.expand_path(options[:derived_data_path])
|
6
|
-
|
6
|
+
UI.message("Derived Data path located at: #{path}")
|
7
7
|
FileUtils.rm_rf(path) if File.directory?(path)
|
8
|
-
|
8
|
+
UI.success("Successfully cleared Derived Data ♻️")
|
9
9
|
end
|
10
10
|
|
11
11
|
#####################################################
|
@@ -2,7 +2,7 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class ClipboardAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
|
5
|
+
UI.message("Storing '#{params[:value]}' in the clipboard 🎨")
|
6
6
|
|
7
7
|
`echo "#{params[:value]}" | tr -d '\n' | pbcopy` # we don't use `sh`, as the command looks ugly
|
8
8
|
end
|
@@ -103,10 +103,10 @@ module Fastlane
|
|
103
103
|
|
104
104
|
Actions.sh("git commit -m '#{params[:message]}'")
|
105
105
|
|
106
|
-
|
106
|
+
UI.success("Committed \"#{params[:message]}\" 💾.")
|
107
107
|
rescue => ex
|
108
|
-
|
109
|
-
|
108
|
+
UI.error(ex)
|
109
|
+
UI.important("Didn't commit any changes.")
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
@@ -10,7 +10,7 @@ module Fastlane
|
|
10
10
|
base_command = params[:keep_original] ? 'cp' : 'mv'
|
11
11
|
options = []
|
12
12
|
options << '-f'
|
13
|
-
options << '-
|
13
|
+
options << '-R' if params[:keep_original] # we only want the -R flag for the cp command, which we get when the user asks to keep the original
|
14
14
|
options << params[:artifacts].map { |e| e.tr(' ', '\ ') }
|
15
15
|
options << params[:target_path]
|
16
16
|
|
@@ -22,7 +22,7 @@ module Fastlane
|
|
22
22
|
# call our command
|
23
23
|
Actions.sh(command)
|
24
24
|
|
25
|
-
|
25
|
+
UI.success('Build artifacts sucesfully copied!')
|
26
26
|
end
|
27
27
|
|
28
28
|
#####################################################
|
@@ -9,11 +9,11 @@ module Fastlane
|
|
9
9
|
|
10
10
|
# We need to store notes in a file, because the crashlytics CLI (iOS) says so
|
11
11
|
if params[:notes]
|
12
|
-
|
12
|
+
UI.error("Overwriting :notes_path, because you specified :notes") if params[:notes_path]
|
13
13
|
|
14
14
|
params[:notes_path] = Helper::CrashlyticsHelper.write_to_tempfile(params[:notes], 'changelog').path
|
15
15
|
elsif Actions.lane_context[SharedValues::FL_CHANGELOG] && !params[:notes_path]
|
16
|
-
|
16
|
+
UI.message("Sending FL_CHANGELOG as release notes to Beta by Crashlytics")
|
17
17
|
|
18
18
|
params[:notes_path] = Helper::CrashlyticsHelper.write_to_tempfile(
|
19
19
|
Actions.lane_context[SharedValues::FL_CHANGELOG], 'changelog').path
|
@@ -27,13 +27,13 @@ module Fastlane
|
|
27
27
|
raise "You have to either pass an ipa or an apk file to the Crashlytics action".red
|
28
28
|
end
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
Actions.sh
|
30
|
+
UI.success('Uploading the build to Crashlytics Beta. Time for some ☕️.')
|
31
|
+
UI.verbose(command.join(" ")) if $verbose
|
32
|
+
Actions.sh(command.join(" "), log: false)
|
33
33
|
|
34
34
|
return command if Helper.test?
|
35
35
|
|
36
|
-
|
36
|
+
UI.success('Build successfully uploaded to Crashlytics Beta 🌷')
|
37
37
|
end
|
38
38
|
|
39
39
|
def self.description
|
@@ -9,7 +9,7 @@ module Fastlane
|
|
9
9
|
require 'excon'
|
10
10
|
require 'base64'
|
11
11
|
|
12
|
-
|
12
|
+
UI.message("Creating new pull request from '#{params[:head]}' to branch '#{params[:base]}' of '#{params[:repo]}'")
|
13
13
|
|
14
14
|
url = "#{params[:api_url]}/repos/#{params[:repo]}/pulls"
|
15
15
|
headers = { 'User-Agent' => 'fastlane-create_pull_request' }
|
@@ -29,11 +29,11 @@ module Fastlane
|
|
29
29
|
body = JSON.parse(response.body)
|
30
30
|
number = body['number']
|
31
31
|
html_url = body['html_url']
|
32
|
-
|
32
|
+
UI.success("Successfully created pull request ##{number}. You can see it at '#{html_url}'")
|
33
33
|
|
34
34
|
Actions.lane_context[SharedValues::CREATE_PULL_REQUEST_HTML_URL] = html_url
|
35
35
|
elsif response[:status] != 200
|
36
|
-
|
36
|
+
UI.error("GitHub responded with #{response[:status]}: #{response[:body]}")
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -22,7 +22,7 @@ module Fastlane
|
|
22
22
|
require 'shenzhen/plugins/deploygate'
|
23
23
|
|
24
24
|
# Available options: https://deploygate.com/docs/api
|
25
|
-
|
25
|
+
UI.success('Starting with ipa upload to DeployGate... this could take some time ⏳')
|
26
26
|
|
27
27
|
client = Shenzhen::Plugins::DeployGate::Client.new(
|
28
28
|
options[:api_token],
|
@@ -33,8 +33,8 @@ module Fastlane
|
|
33
33
|
|
34
34
|
response = client.upload_build(options[:ipa], options.values)
|
35
35
|
if parse_response(response)
|
36
|
-
|
37
|
-
|
36
|
+
UI.message("DeployGate URL: #{Actions.lane_context[SharedValues::DEPLOYGATE_URL]}")
|
37
|
+
UI.success("Build successfully uploaded to DeployGate as revision \##{Actions.lane_context[SharedValues::DEPLOYGATE_REVISION]}!")
|
38
38
|
else
|
39
39
|
raise 'Error when trying to upload ipa to DeployGate'.red
|
40
40
|
end
|
@@ -44,7 +44,7 @@ module Fastlane
|
|
44
44
|
if response.body && response.body.key?('error')
|
45
45
|
|
46
46
|
if response.body['error']
|
47
|
-
|
47
|
+
UI.error("Error uploading to DeployGate: #{response.body['message']}")
|
48
48
|
help_message(response)
|
49
49
|
return
|
50
50
|
else
|
@@ -56,7 +56,7 @@ module Fastlane
|
|
56
56
|
Actions.lane_context[SharedValues::DEPLOYGATE_APP_INFO] = res
|
57
57
|
end
|
58
58
|
else
|
59
|
-
|
59
|
+
UI.error("Error uploading to DeployGate: #{response.body}")
|
60
60
|
return
|
61
61
|
end
|
62
62
|
true
|
@@ -73,7 +73,7 @@ module Fastlane
|
|
73
73
|
when 'application create error: limit'
|
74
74
|
'Plan limit: You have reached to the limit of current plan or your plan was expired.'
|
75
75
|
end
|
76
|
-
|
76
|
+
UI.error(message) if message
|
77
77
|
end
|
78
78
|
private_class_method :help_message
|
79
79
|
|
@@ -8,7 +8,7 @@ module Fastlane
|
|
8
8
|
Actions.verify_gem!('dotgpg')
|
9
9
|
require 'dotgpg/environment'
|
10
10
|
|
11
|
-
|
11
|
+
UI.message("Reading secrets from #{options[:dotgpg_file]}")
|
12
12
|
Dotgpg::Environment.new(options[:dotgpg_file]).apply
|
13
13
|
end
|
14
14
|
|
@@ -43,7 +43,7 @@ module Fastlane
|
|
43
43
|
env_name: "FL_DOWNLOAD_URL",
|
44
44
|
description: "The URL that should be downloaded",
|
45
45
|
verify_block: proc do |value|
|
46
|
-
|
46
|
+
UI.important("The URL doesn't start with http or https") unless value.start_with?("http")
|
47
47
|
end)
|
48
48
|
]
|
49
49
|
end
|
@@ -0,0 +1,117 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
module SharedValues
|
4
|
+
DSYM_PATHS = :DSYM_PATHS
|
5
|
+
end
|
6
|
+
|
7
|
+
class DownloadDsymsAction < Action
|
8
|
+
def self.run(params)
|
9
|
+
require 'spaceship'
|
10
|
+
require 'net/http'
|
11
|
+
|
12
|
+
UI.message("Login to iTunes Connect (#{params[:username]})")
|
13
|
+
Spaceship::Tunes.login(params[:username])
|
14
|
+
Spaceship::Tunes.select_team
|
15
|
+
UI.message("Login successful")
|
16
|
+
|
17
|
+
UI.message("Looking for dSYM files for #{params[:app_identifier]}...")
|
18
|
+
app = Spaceship::Application.find(params[:app_identifier])
|
19
|
+
app.all_build_train_numbers.each do |train_number|
|
20
|
+
app.all_builds_for_train(train: train_number).each do |build|
|
21
|
+
download_url = build.details.dsym_url
|
22
|
+
if download_url
|
23
|
+
result = self.download download_url
|
24
|
+
file_name = "#{app.bundle_id}-#{train_number}-#{build.build_version}.dSYM.zip"
|
25
|
+
File.write(file_name, result)
|
26
|
+
UI.success("🔑 Successfully downloaded dSYM file for #{train_number} - #{build.build_version} to '#{file_name}'")
|
27
|
+
|
28
|
+
Actions.lane_context[SharedValues::DSYM_PATHS] ||= []
|
29
|
+
Actions.lane_context[SharedValues::DSYM_PATHS] << File.expand_path(file_name)
|
30
|
+
else
|
31
|
+
UI.message("No dSYM URL for #{build.build_version} (#{build.train_version})")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.download(url)
|
38
|
+
uri = URI.parse(url)
|
39
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
40
|
+
http.use_ssl = (uri.scheme == "https")
|
41
|
+
res = http.get(uri.request_uri)
|
42
|
+
res.body
|
43
|
+
end
|
44
|
+
|
45
|
+
#####################################################
|
46
|
+
# @!group Documentation
|
47
|
+
#####################################################
|
48
|
+
|
49
|
+
def self.description
|
50
|
+
"Download dSYM files from Apple iTunes Connect for Bitcode apps"
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.details
|
54
|
+
[
|
55
|
+
"This action downloads dSYM files from Apple iTunes Connect after",
|
56
|
+
"the ipa got re-compiled by Apple. Useful if you have Bitcode enabled"
|
57
|
+
].join(" ")
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.available_options
|
61
|
+
user = CredentialsManager::AppfileConfig.try_fetch_value(:itunes_connect_id)
|
62
|
+
user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
|
63
|
+
|
64
|
+
[
|
65
|
+
FastlaneCore::ConfigItem.new(key: :username,
|
66
|
+
short_option: "-u",
|
67
|
+
env_name: "DOWNLOAD_DSYMS_USERNAME",
|
68
|
+
description: "Your Apple ID Username for iTunes Connect",
|
69
|
+
default_value: user),
|
70
|
+
FastlaneCore::ConfigItem.new(key: :app_identifier,
|
71
|
+
short_option: "-a",
|
72
|
+
env_name: "DOWNLOAD_DSYMS_APP_IDENTIFIER",
|
73
|
+
description: "The bundle identifier of your app",
|
74
|
+
optional: true,
|
75
|
+
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)),
|
76
|
+
FastlaneCore::ConfigItem.new(key: :team_id,
|
77
|
+
short_option: "-k",
|
78
|
+
env_name: "DOWNLOAD_DSYMS_TEAM_ID",
|
79
|
+
description: "The ID of your team if you're in multiple teams",
|
80
|
+
optional: true,
|
81
|
+
is_string: false, # as we also allow integers, which we convert to strings anyway
|
82
|
+
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_id),
|
83
|
+
verify_block: proc do |value|
|
84
|
+
ENV["FASTLANE_ITC_TEAM_ID"] = value.to_s
|
85
|
+
end),
|
86
|
+
FastlaneCore::ConfigItem.new(key: :team_name,
|
87
|
+
short_option: "-e",
|
88
|
+
env_name: "DOWNLOAD_DSYMS_TEAM_NAME",
|
89
|
+
description: "The name of your team if you're in multiple teams",
|
90
|
+
optional: true,
|
91
|
+
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_name),
|
92
|
+
verify_block: proc do |value|
|
93
|
+
ENV["FASTLANE_ITC_TEAM_NAME"] = value
|
94
|
+
end)
|
95
|
+
]
|
96
|
+
end
|
97
|
+
|
98
|
+
def self.output
|
99
|
+
[
|
100
|
+
['DSYM_PATHS', 'An array to all the zipped dSYM files']
|
101
|
+
]
|
102
|
+
end
|
103
|
+
|
104
|
+
def self.return_value
|
105
|
+
nil
|
106
|
+
end
|
107
|
+
|
108
|
+
def self.authors
|
109
|
+
["KrauseFx"]
|
110
|
+
end
|
111
|
+
|
112
|
+
def self.is_supported?(platform)
|
113
|
+
platform == :ios
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
@@ -9,7 +9,7 @@ module Fastlane
|
|
9
9
|
branch = params[:branch]
|
10
10
|
branch_expr = /#{branch}/
|
11
11
|
if Actions.git_branch =~ branch_expr
|
12
|
-
|
12
|
+
UI.success("Git branch match `#{branch}`, all good! 💪")
|
13
13
|
else
|
14
14
|
raise "Git is not on a branch matching `#{branch}`. Current branch is `#{Actions.git_branch}`! Please ensure the repo is checked out to the correct branch.".red
|
15
15
|
end
|
@@ -10,7 +10,7 @@ module Fastlane
|
|
10
10
|
repo_clean = `git status --porcelain`.empty?
|
11
11
|
|
12
12
|
if repo_clean
|
13
|
-
|
13
|
+
UI.success('Git status is clean, all good! 💪')
|
14
14
|
Actions.lane_context[SharedValues::GIT_REPO_WAS_CLEAN_ON_START] = true
|
15
15
|
else
|
16
16
|
raise 'Git repository is dirty! Please ensure the repo is in a clean state by commiting/stashing/discarding all changes first.'.red
|
@@ -2,10 +2,26 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class EnsureNoDebugCodeAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
command = "grep -
|
5
|
+
command = "grep -RE '#{params[:text]}' '#{File.absolute_path(params[:path])}'"
|
6
|
+
|
7
|
+
extensions = []
|
8
|
+
extensions << params[:extension] unless params[:extension].nil?
|
9
|
+
|
10
|
+
if params[:extensions]
|
11
|
+
params[:extensions].each do |extension|
|
12
|
+
extension.delete!('.') if extension.include? "."
|
13
|
+
extensions << extension
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
if extensions.count > 1
|
18
|
+
command << " --include=\\*.{#{extensions.join(',')}}"
|
19
|
+
elsif extensions.count > 0
|
20
|
+
command << " --include=\\*.#{extensions.join(',')}"
|
21
|
+
end
|
6
22
|
return command if Helper.is_test?
|
7
23
|
|
8
|
-
|
24
|
+
UI.important(command)
|
9
25
|
results = `#{command}` # we don't use `sh` as the return code of grep is wrong for some reason
|
10
26
|
|
11
27
|
# Example Output
|
@@ -14,18 +30,11 @@ module Fastlane
|
|
14
30
|
|
15
31
|
found = []
|
16
32
|
results.split("\n").each do |current_raw|
|
17
|
-
|
18
|
-
if params[:extension]
|
19
|
-
if current.include? ".#{params[:extension]}:"
|
20
|
-
found << current
|
21
|
-
end
|
22
|
-
else
|
23
|
-
found << current
|
24
|
-
end
|
33
|
+
found << current_raw.strip
|
25
34
|
end
|
26
35
|
|
27
36
|
raise "Found debug code '#{params[:text]}': \n\n#{found.join("\n")}" if found.count > 0
|
28
|
-
|
37
|
+
UI.message("No debug code found in code base 🐛")
|
29
38
|
end
|
30
39
|
|
31
40
|
#####################################################
|
@@ -62,7 +71,12 @@ module Fastlane
|
|
62
71
|
optional: true,
|
63
72
|
verify_block: proc do |value|
|
64
73
|
value.delete!('.') if value.include? "."
|
65
|
-
end)
|
74
|
+
end),
|
75
|
+
FastlaneCore::ConfigItem.new(key: :extensions,
|
76
|
+
env_name: "FL_ENSURE_NO_DEBUG_CODE_EXTENSIONS",
|
77
|
+
description: "An array of file extensions that should be searched for",
|
78
|
+
optional: true,
|
79
|
+
is_string: false)
|
66
80
|
]
|
67
81
|
end
|
68
82
|
|
@@ -13,10 +13,10 @@ module Fastlane
|
|
13
13
|
versions_match = selected_version == "Xcode #{required_version}"
|
14
14
|
|
15
15
|
if versions_match
|
16
|
-
|
16
|
+
UI.success("Selected Xcode version is correct: #{selected_version}")
|
17
17
|
else
|
18
|
-
|
19
|
-
|
18
|
+
UI.message("Selected Xcode version is not correct: #{selected_version}. You expected #{required_version}.")
|
19
|
+
UI.message("To correct this, use: `xcode_select(version: #{required_version})`.")
|
20
20
|
|
21
21
|
raise "Selected Xcode version doesn't match your requirement.\nExpected: Xcode #{required_version}\nActual: #{selected_version}\n"
|
22
22
|
end
|
data/lib/fastlane/actions/erb.rb
CHANGED
@@ -5,7 +5,7 @@ module Fastlane
|
|
5
5
|
template = File.read(params[:template])
|
6
6
|
result = ERB.new(template).result(OpenStruct.new(params[:placeholders]).instance_eval { binding })
|
7
7
|
File.open(params[:destination], 'w') { |file| file.write(result) } if params[:destination]
|
8
|
-
|
8
|
+
UI.message("Successfully parsed template: '#{params[:template]}' and rendered output to: #{params[:destination]}") if params[:destination]
|
9
9
|
result
|
10
10
|
end
|
11
11
|
|
@@ -15,7 +15,7 @@ module Fastlane
|
|
15
15
|
raise "The Fastfile requires a fastlane version of >= #{defined_version}. You are on #{Fastlane::VERSION}. Please update using `sudo gem update fastlane`.".red
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
UI.message("fastlane version valid")
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.step_text
|
@@ -11,7 +11,7 @@ module Fastlane
|
|
11
11
|
color = Frameit::Color::BLACK
|
12
12
|
color = Frameit::Color::SILVER if config[:white] || config[:silver]
|
13
13
|
|
14
|
-
|
14
|
+
UI.message("Framing screenshots at path #{config[:path]}")
|
15
15
|
|
16
16
|
Dir.chdir(config[:path]) do
|
17
17
|
ENV["FRAMEIT_FORCE_DEVICE_TYPE"] = config[:force_device_type] if config[:force_device_type]
|
@@ -78,8 +78,8 @@ module Fastlane
|
|
78
78
|
gcovr_args = gcovr_args.join(" ")
|
79
79
|
|
80
80
|
command = "gcovr #{gcovr_args}"
|
81
|
-
|
82
|
-
|
81
|
+
UI.success("Generating code coverage.")
|
82
|
+
UI.verbose(command)
|
83
83
|
Actions.sh command
|
84
84
|
end
|
85
85
|
|
@@ -31,7 +31,7 @@ module Fastlane
|
|
31
31
|
Actions.lane_context[SharedValues::BUILD_NUMBER] = build_number
|
32
32
|
end
|
33
33
|
rescue => ex
|
34
|
-
|
34
|
+
UI.error('Make sure to follow the steps to setup your Xcode project: https://developer.apple.com/library/ios/qa/qa1827/_index.html')
|
35
35
|
raise ex
|
36
36
|
end
|
37
37
|
|
@@ -6,7 +6,7 @@ module Fastlane
|
|
6
6
|
|
7
7
|
class GetGithubReleaseAction < Action
|
8
8
|
def self.run(params)
|
9
|
-
|
9
|
+
UI.message("Getting release on GitHub (#{params[:server_url]}/#{params[:url]}: #{params[:version]})")
|
10
10
|
require 'excon'
|
11
11
|
require 'base64'
|
12
12
|
|
@@ -19,14 +19,14 @@ module Fastlane
|
|
19
19
|
|
20
20
|
case response[:status]
|
21
21
|
when 404
|
22
|
-
|
22
|
+
UI.error("Repository #{params[:url]} cannot be found, please double check its name and that you provided a valid API token (if it's a private repository).")
|
23
23
|
return nil
|
24
24
|
when 401
|
25
|
-
|
25
|
+
UI.error("You are not authorized to access #{params[:url]}, please make sure you provided a valid API token.")
|
26
26
|
return nil
|
27
27
|
else
|
28
28
|
if response[:status] != 200
|
29
|
-
|
29
|
+
UI.error("GitHub responded with #{response[:status]}:#{response[:body]}")
|
30
30
|
return nil
|
31
31
|
end
|
32
32
|
end
|
@@ -37,11 +37,11 @@ module Fastlane
|
|
37
37
|
|
38
38
|
# Found it
|
39
39
|
Actions.lane_context[SharedValues::GET_GITHUB_RELEASE_INFO] = current
|
40
|
-
|
40
|
+
UI.message("Version is already live on GitHub.com 🚁")
|
41
41
|
return current
|
42
42
|
end
|
43
43
|
|
44
|
-
|
44
|
+
UI.important("Couldn't find GitHub release #{params[:version]}")
|
45
45
|
return nil
|
46
46
|
end
|
47
47
|
|