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
@@ -28,7 +28,7 @@ module Fastlane
|
|
28
28
|
# Verify that a path to a directory was passed in
|
29
29
|
raise "Path '#{xcode_path}' doesn't exist".red unless Dir.exist?(xcode_path)
|
30
30
|
|
31
|
-
|
31
|
+
UI.message("Setting Xcode version to #{xcode_path} for all build steps")
|
32
32
|
|
33
33
|
ENV["DEVELOPER_DIR"] = File.join(xcode_path, "/Contents/Developer")
|
34
34
|
end
|
@@ -30,7 +30,7 @@ module Fastlane
|
|
30
30
|
xcs = XcodeServer.new(host, username, password)
|
31
31
|
bots = xcs.fetch_all_bots
|
32
32
|
|
33
|
-
|
33
|
+
UI.important("Fetched #{bots.count} Bots from Xcode Server at #{host}.")
|
34
34
|
|
35
35
|
# pull out names
|
36
36
|
bot_names = bots.map { |bot| bot['name'] }
|
@@ -41,7 +41,7 @@ module Fastlane
|
|
41
41
|
|
42
42
|
bot = found_bots[0]
|
43
43
|
|
44
|
-
|
44
|
+
UI.success("Found Bot with name #{bot_name} with id #{bot['_id']}.")
|
45
45
|
|
46
46
|
# we have our bot, get finished integrations, sorted from newest to oldest
|
47
47
|
integrations = xcs.fetch_integrations(bot['_id']).select { |i| i['currentStep'] == 'completed' }
|
@@ -57,7 +57,7 @@ module Fastlane
|
|
57
57
|
|
58
58
|
# consider: only taking the last successful one? or allow failing tests? warnings?
|
59
59
|
|
60
|
-
|
60
|
+
UI.important("Using integration #{integration['number']}.")
|
61
61
|
|
62
62
|
# fetch assets for this integration
|
63
63
|
assets_path = xcs.fetch_assets(integration['_id'], target_folder, self)
|
@@ -65,21 +65,21 @@ module Fastlane
|
|
65
65
|
|
66
66
|
asset_entries = Dir.entries(assets_path).map { |i| File.join(assets_path, i) }
|
67
67
|
|
68
|
-
|
68
|
+
UI.success("Successfully downloaded #{asset_entries.count} assets to file #{assets_path}!")
|
69
69
|
|
70
70
|
# now find the archive and unzip it
|
71
71
|
zipped_archive_path = asset_entries.find { |i| i.end_with?('xcarchive.zip') }
|
72
72
|
|
73
73
|
if zipped_archive_path
|
74
74
|
|
75
|
-
|
75
|
+
UI.important("Found an archive in the assets folder...")
|
76
76
|
|
77
77
|
archive_file_path = File.basename(zipped_archive_path, File.extname(zipped_archive_path))
|
78
78
|
archive_dir_path = File.dirname(zipped_archive_path)
|
79
79
|
archive_path = File.join(archive_dir_path, archive_file_path)
|
80
80
|
if File.exist?(archive_path)
|
81
81
|
# we already have the archive, skip
|
82
|
-
|
82
|
+
UI.important("Archive #{archive_path} already exists, not unzipping again...")
|
83
83
|
else
|
84
84
|
# unzip the archive
|
85
85
|
sh "unzip -q \"#{zipped_archive_path}\" -d \"#{archive_dir_path}\""
|
@@ -135,9 +135,9 @@ module Fastlane
|
|
135
135
|
f = open(temp_file, 'w')
|
136
136
|
streamer = lambda do |chunk, remaining_bytes, total_bytes|
|
137
137
|
if remaining_bytes && total_bytes
|
138
|
-
|
138
|
+
UI.important("Downloading: #{100 - (100 * remaining_bytes.to_f / total_bytes.to_f).to_i}%")
|
139
139
|
else
|
140
|
-
|
140
|
+
UI.error(chunk.to_s)
|
141
141
|
end
|
142
142
|
f.write(chunk)
|
143
143
|
end
|
@@ -235,7 +235,7 @@ module Fastlane
|
|
235
235
|
pipe_command = "| tee '#{buildlog_path}/xcodebuild.log' #{xcpretty_command}"
|
236
236
|
|
237
237
|
FileUtils.mkdir_p buildlog_path
|
238
|
-
|
238
|
+
UI.message("For a more detailed xcodebuild log open #{buildlog_path}/xcodebuild.log")
|
239
239
|
|
240
240
|
output_result = ""
|
241
241
|
|
@@ -253,8 +253,8 @@ module Fastlane
|
|
253
253
|
if (iphone_simulator_time_out_error =~ ex.message) != nil
|
254
254
|
raise_error = false
|
255
255
|
|
256
|
-
|
257
|
-
|
256
|
+
UI.important("First attempt failed with iPhone Simulator error: #{iphone_simulator_time_out_error.source}")
|
257
|
+
UI.important("Retrying once more...")
|
258
258
|
output_result = Actions.sh "set -o pipefail && xcodebuild #{xcodebuild_args} #{pipe_command}"
|
259
259
|
end
|
260
260
|
end
|
@@ -320,12 +320,12 @@ module Fastlane
|
|
320
320
|
workspaces = Dir.glob("*.xcworkspace")
|
321
321
|
|
322
322
|
if workspaces.length > 1
|
323
|
-
|
323
|
+
UI.important("Multiple workspaces detected.")
|
324
324
|
end
|
325
325
|
|
326
326
|
unless workspaces.empty?
|
327
327
|
workspace = workspaces.first
|
328
|
-
|
328
|
+
UI.important("Using workspace \"#{workspace}\"")
|
329
329
|
end
|
330
330
|
|
331
331
|
return workspace
|
@@ -351,7 +351,7 @@ module Fastlane
|
|
351
351
|
end
|
352
352
|
|
353
353
|
def self.details
|
354
|
-
"More information on GitHub: https://github.com/fastlane/fastlane/blob/master/docs/Actions.md#xcodebuild"
|
354
|
+
"More information on GitHub: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md#xcodebuild"
|
355
355
|
end
|
356
356
|
|
357
357
|
def self.author
|
@@ -500,7 +500,7 @@ module Fastlane
|
|
500
500
|
|
501
501
|
class XctestAction < Action
|
502
502
|
def self.run(params)
|
503
|
-
|
503
|
+
UI.important("Have you seen the new 'scan' tool to run tests? https://github.com/fastlane/fastlane/tree/master/scan")
|
504
504
|
params_hash = params || {}
|
505
505
|
params_hash[:build] = true
|
506
506
|
params_hash[:test] = true
|
@@ -21,6 +21,12 @@ module Fastlane
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.available_options
|
24
|
+
# We call Gem::Specification.find_by_name in many more places than this, but for right now
|
25
|
+
# this is the only place we're having trouble. If there are other reports about RubyGems
|
26
|
+
# 2.6.2 causing problems, we may need to move this code and require it someplace better,
|
27
|
+
# like fastlane_core
|
28
|
+
require 'fastlane/core_ext/bundler_monkey_patch'
|
29
|
+
|
24
30
|
begin
|
25
31
|
Gem::Specification.find_by_name('xcov')
|
26
32
|
rescue Gem::LoadError
|
@@ -2,7 +2,7 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class XctoolAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
|
5
|
+
UI.important("Have you seen the new 'scan' tool to run tests? https://github.com/fastlane/fastlane/tree/master/scan")
|
6
6
|
unless Helper.test?
|
7
7
|
raise 'xctool not installed, please install using `brew install xctool`'.red if `which xctool`.length == 0
|
8
8
|
end
|
@@ -19,7 +19,7 @@ module Fastlane
|
|
19
19
|
def self.details
|
20
20
|
[
|
21
21
|
"It is recommended to store the build configuration in the `.xctool-args` file.",
|
22
|
-
"More information available on GitHub: https://github.com/fastlane/fastlane/blob/master/docs/Actions.md#xctool"
|
22
|
+
"More information available on GitHub: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md#xctool"
|
23
23
|
].join(' ')
|
24
24
|
end
|
25
25
|
|
@@ -11,7 +11,7 @@ module Fastlane
|
|
11
11
|
key, value = current.split(":", 2)
|
12
12
|
raise "Please pass values like this: key:value" unless key.length > 0
|
13
13
|
value = convert_value(value)
|
14
|
-
|
14
|
+
UI.verbose("Using #{key}: #{value}")
|
15
15
|
lane_parameters[key.to_sym] = value
|
16
16
|
else
|
17
17
|
platform_lane_info << current
|
@@ -18,8 +18,8 @@ module Fastlane
|
|
18
18
|
end
|
19
19
|
rescue => ex
|
20
20
|
if action.respond_to? :action_name
|
21
|
-
|
22
|
-
|
21
|
+
UI.error("You passed invalid parameters to '#{action.action_name}'.")
|
22
|
+
UI.error("Check out the error below and available options by running `fastlane action #{action.action_name}`")
|
23
23
|
end
|
24
24
|
raise ex
|
25
25
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# https://github.com/bundler/bundler/issues/4368
|
2
|
+
#
|
3
|
+
# There is an issue with Rubygems 2.6.2 where it attempts to call Bundler::SpecSet#size, which doesn't exist.
|
4
|
+
# If a gem is not installed, a `Gem::Specification.find_by_name` call will trigger this problem.
|
5
|
+
if Object.const_defined?(:Bundler) &&
|
6
|
+
Bundler.const_defined?(:SpecSet) &&
|
7
|
+
Bundler::SpecSet.instance_methods.include?(:length) &&
|
8
|
+
!Bundler::SpecSet.instance_methods.include?(:size)
|
9
|
+
module Bundler
|
10
|
+
class SpecSet
|
11
|
+
alias_method :size, :length
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -5,9 +5,9 @@ class String
|
|
5
5
|
|
6
6
|
def fastlane_underscore
|
7
7
|
self.gsub(/::/, '/').
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
|
9
|
+
gsub(/([a-z\d])([A-Z])/, '\1_\2').
|
10
|
+
tr("-", "_").
|
11
|
+
downcase
|
12
12
|
end
|
13
13
|
end
|
@@ -24,7 +24,7 @@ module Fastlane
|
|
24
24
|
current << authors.first.green if authors.count == 1
|
25
25
|
current << "Multiple".green if authors.count > 1
|
26
26
|
else
|
27
|
-
|
27
|
+
UI.error("Please update your action file #{name} to be a subclass of `Action` by adding ` < Action` after your class name.")
|
28
28
|
current << "Please update action file".red
|
29
29
|
end
|
30
30
|
rows << current
|
@@ -114,7 +114,7 @@ module Fastlane
|
|
114
114
|
puts ""
|
115
115
|
end
|
116
116
|
|
117
|
-
puts "More information can be found on https://github.com/fastlane/fastlane/blob/master/docs/Actions.md"
|
117
|
+
puts "More information can be found on https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md"
|
118
118
|
puts "\n"
|
119
119
|
|
120
120
|
return # our job is done here
|
@@ -32,9 +32,9 @@ module Fastlane
|
|
32
32
|
output << ""
|
33
33
|
end
|
34
34
|
|
35
|
-
output << "This README.md is auto-generated and will be re-generated every time to run [fastlane](https://fastlane.tools).
|
36
|
-
output << "More information about fastlane can be found on [https://fastlane.tools](https://fastlane.tools).
|
37
|
-
output << "The documentation of fastlane can be found on [GitHub](https://github.com/fastlane/fastlane)."
|
35
|
+
output << "This README.md is auto-generated and will be re-generated every time to run [fastlane](https://fastlane.tools)."
|
36
|
+
output << "More information about fastlane can be found on [https://fastlane.tools](https://fastlane.tools)."
|
37
|
+
output << "The documentation of fastlane can be found on [GitHub](https://github.com/fastlane/fastlane/tree/master/fastlane)."
|
38
38
|
|
39
39
|
File.write(output_path, output.join("\n"))
|
40
40
|
UI.success "Successfully generated documentation to path '#{File.expand_path(output_path)}'" if $verbose
|
data/lib/fastlane/fast_file.rb
CHANGED
@@ -18,10 +18,10 @@ module Fastlane
|
|
18
18
|
|
19
19
|
# From https://github.com/orta/danger/blob/master/lib/danger/Dangerfile.rb
|
20
20
|
if content.tr!('“”‘’‛', %(""'''))
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
UI.error "Your #{File.basename(path)} has had smart quotes sanitised. " \
|
22
|
+
'To avoid issues in the future, you should not use ' \
|
23
|
+
'TextEdit for editing it. If you are not using TextEdit, ' \
|
24
|
+
'you should turn off smart quotes in your editor of choice.'
|
25
25
|
end
|
26
26
|
|
27
27
|
parse(content, @path)
|
@@ -100,12 +100,12 @@ module Fastlane
|
|
100
100
|
end
|
101
101
|
|
102
102
|
# User defines a platform block
|
103
|
-
def platform(platform_name
|
103
|
+
def platform(platform_name)
|
104
104
|
SupportedPlatforms.verify!(platform_name)
|
105
105
|
|
106
106
|
self.current_platform = platform_name
|
107
107
|
|
108
|
-
|
108
|
+
yield
|
109
109
|
|
110
110
|
self.current_platform = nil
|
111
111
|
end
|
@@ -62,7 +62,7 @@ module Fastlane
|
|
62
62
|
FileUtils.mkdir_p(containing)
|
63
63
|
|
64
64
|
begin
|
65
|
-
|
65
|
+
UI.important("Downloading Crashlytics Support Library - this might take a minute...")
|
66
66
|
|
67
67
|
result = Net::HTTP.get(URI(url))
|
68
68
|
File.write(zip_path, result)
|
@@ -45,7 +45,7 @@ module Fastlane
|
|
45
45
|
# Get the author email of the last git commit
|
46
46
|
# <b>DEPRECATED:</b> Use <tt>git_author_email</tt> instead.
|
47
47
|
def self.git_author
|
48
|
-
|
48
|
+
UI.important('`git_author` is deprecated. Please use `git_author_email` instead.')
|
49
49
|
git_author_email
|
50
50
|
end
|
51
51
|
|
@@ -59,7 +59,7 @@ module Fastlane
|
|
59
59
|
# Returns the unwrapped subject and body of the last commit
|
60
60
|
# <b>DEPRECATED:</b> Use <tt>last_git_commit_message</tt> instead.
|
61
61
|
def self.last_git_commit
|
62
|
-
|
62
|
+
UI.important('`last_git_commit` is deprecated. Please use `last_git_commit_message` instead.')
|
63
63
|
last_git_commit_message
|
64
64
|
end
|
65
65
|
|
data/lib/fastlane/one_off.rb
CHANGED
@@ -10,7 +10,7 @@ module Fastlane
|
|
10
10
|
key, value = current.split(":", 2)
|
11
11
|
raise "Please pass values like this: key:value" unless key.length > 0
|
12
12
|
value = CommandLineHandler.convert_value(value)
|
13
|
-
|
13
|
+
UI.verbose("Using #{key}: #{value}")
|
14
14
|
action_parameters[key.to_sym] = value
|
15
15
|
else
|
16
16
|
action_name ||= current
|
data/lib/fastlane/runner.rb
CHANGED
@@ -115,7 +115,7 @@ module Fastlane
|
|
115
115
|
else
|
116
116
|
# No action and no lane, raising an exception now
|
117
117
|
UI.error caller.join("\n")
|
118
|
-
UI.user_error!("Could not find action or lane '#{new_lane}'. Check out the README for more details: https://github.com/fastlane/fastlane")
|
118
|
+
UI.user_error!("Could not find action or lane '#{new_lane}'. Check out the README for more details: https://github.com/fastlane/fastlane/tree/master/fastlane")
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
data/lib/fastlane/setup/setup.rb
CHANGED
@@ -4,13 +4,13 @@ module Fastlane
|
|
4
4
|
def run
|
5
5
|
platform = nil
|
6
6
|
if is_ios?
|
7
|
-
|
7
|
+
UI.message("Detected iOS/Mac project in current directory...")
|
8
8
|
platform = :ios
|
9
9
|
elsif is_android?
|
10
|
-
|
10
|
+
UI.message("Detected Android project in current directory...")
|
11
11
|
platform = :android
|
12
12
|
else
|
13
|
-
|
13
|
+
UI.message("Couldn't automatically detect the platform")
|
14
14
|
val = agree("Is this project an iOS project? (y/n) ".yellow, true)
|
15
15
|
platform = (val ? :ios : :android)
|
16
16
|
end
|
@@ -33,10 +33,10 @@ module Fastlane
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def show_analytics
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
36
|
+
UI.message("fastlane will send the number of errors for each action to")
|
37
|
+
UI.message("https://github.com/fastlane/enhancer to detect integration issues")
|
38
|
+
UI.message("No sensitive/private information will be uploaded")
|
39
|
+
UI.message("You can disable this by adding `opt_out_usage` to your Fastfile")
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
@@ -2,7 +2,7 @@ module Fastlane
|
|
2
2
|
class SetupAndroid < Setup
|
3
3
|
def run
|
4
4
|
if FastlaneFolder.setup? and !Helper.is_test?
|
5
|
-
|
5
|
+
UI.important("Fastlane already set up at path #{folder}")
|
6
6
|
return
|
7
7
|
end
|
8
8
|
|
@@ -17,18 +17,18 @@ module Fastlane
|
|
17
17
|
|
18
18
|
init_supply
|
19
19
|
|
20
|
-
|
20
|
+
UI.success('Successfully finished setting up fastlane')
|
21
21
|
end
|
22
22
|
|
23
23
|
def generate_appfile
|
24
|
-
|
25
|
-
|
24
|
+
UI.message('------------------------------')
|
25
|
+
UI.success('To not re-enter your packagename and issuer every time you run one of the fastlane tools or fastlane, these will be stored in a so-called Appfile.')
|
26
26
|
|
27
27
|
package_name = ask('Package Name (com.krausefx.app): '.yellow)
|
28
28
|
puts ""
|
29
29
|
puts "To automatically upload builds and metadata to Google Play, fastlane needs a service action json secret file".yellow
|
30
30
|
puts "Feel free to just click Enter to skip not provide certain things"
|
31
|
-
puts "Follow the Setup Guide on how to get the Json file: https://github.com/fastlane/supply#setup".yellow
|
31
|
+
puts "Follow the Setup Guide on how to get the Json file: https://github.com/fastlane/fastlane/tree/master/supply#setup".yellow
|
32
32
|
json_key_file = ask('Path to the json secret file: '.yellow)
|
33
33
|
|
34
34
|
template = File.read("#{Helper.gem_path('fastlane')}/lib/assets/AppfileTemplateAndroid")
|
@@ -36,7 +36,7 @@ module Fastlane
|
|
36
36
|
template.gsub!('[[PACKAGE_NAME]]', package_name)
|
37
37
|
path = File.join(folder, 'Appfile')
|
38
38
|
File.write(path, template)
|
39
|
-
|
39
|
+
UI.success("Created new file '#{path}'. Edit it to manage your preferred app metadata information.")
|
40
40
|
end
|
41
41
|
|
42
42
|
def generate_fastfile
|
@@ -46,14 +46,14 @@ module Fastlane
|
|
46
46
|
|
47
47
|
path = File.join(folder, 'Fastfile')
|
48
48
|
File.write(path, template)
|
49
|
-
|
49
|
+
UI.success("Created new file '#{path}'. Edit it to manage your own deployment lanes.")
|
50
50
|
end
|
51
51
|
|
52
52
|
def init_supply
|
53
|
-
|
53
|
+
UI.message("")
|
54
54
|
question = "Do you plan on uploading metadata, screenshots and builds to Google Play using fastlane?".yellow
|
55
|
-
|
56
|
-
|
55
|
+
UI.message(question)
|
56
|
+
UI.message("This will download your existing metadata and screenshots into the `fastlane` folder")
|
57
57
|
if agree(question + " (y/n) ", true)
|
58
58
|
begin
|
59
59
|
require 'supply'
|
@@ -61,11 +61,11 @@ module Fastlane
|
|
61
61
|
Supply.config = FastlaneCore::Configuration.create(Supply::Options.available_options, {})
|
62
62
|
Supply::Setup.new.perform_download
|
63
63
|
rescue => ex
|
64
|
-
|
65
|
-
|
64
|
+
UI.error(ex.to_s)
|
65
|
+
UI.error("supply failed, but don't worry, you can launch supply using `supply init` whenever you want.")
|
66
66
|
end
|
67
67
|
else
|
68
|
-
|
68
|
+
UI.success("You can run `supply init` to do so at a later point.")
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
@@ -16,14 +16,13 @@ module Fastlane
|
|
16
16
|
|
17
17
|
def run
|
18
18
|
if FastlaneFolder.setup? and !Helper.is_test?
|
19
|
-
|
19
|
+
UI.important("Fastlane already set up at path #{folder}")
|
20
20
|
return
|
21
21
|
end
|
22
22
|
|
23
23
|
show_infos
|
24
24
|
|
25
25
|
FastlaneFolder.create_folder! unless Helper.is_test?
|
26
|
-
fastlane_actions_path = File.join(FastlaneFolder.path, 'actions')
|
27
26
|
is_manual_setup = false
|
28
27
|
|
29
28
|
begin
|
@@ -32,19 +31,19 @@ module Fastlane
|
|
32
31
|
detect_if_app_is_available
|
33
32
|
print_config_table
|
34
33
|
if UI.confirm("Please confirm the above values")
|
35
|
-
default_setup
|
34
|
+
default_setup
|
36
35
|
else
|
37
36
|
is_manual_setup = true
|
38
|
-
manual_setup
|
37
|
+
manual_setup
|
39
38
|
end
|
40
|
-
|
39
|
+
UI.success('Successfully finished setting up fastlane')
|
41
40
|
rescue => ex # this will also be caused by Ctrl + C
|
42
41
|
if is_manual_setup
|
43
42
|
handle_exception(exception: ex)
|
44
43
|
else
|
45
|
-
|
46
|
-
|
47
|
-
try_manual_setup
|
44
|
+
UI.error(ex.to_s)
|
45
|
+
UI.error('An error occured during the setup process. Falling back to manual setup!')
|
46
|
+
try_manual_setup
|
48
47
|
end
|
49
48
|
end
|
50
49
|
# rubocop:enable Lint/RescueException
|
@@ -53,18 +52,18 @@ module Fastlane
|
|
53
52
|
def handle_exception(exception: nil)
|
54
53
|
# Something went wrong with the setup, clear the folder again
|
55
54
|
# and restore previous files
|
56
|
-
|
55
|
+
UI.error('Error occurred with the setup program! Reverting changes now!')
|
57
56
|
restore_previous_state
|
58
57
|
raise exception
|
59
58
|
end
|
60
59
|
|
61
|
-
def try_manual_setup
|
62
|
-
manual_setup
|
60
|
+
def try_manual_setup
|
61
|
+
manual_setup
|
63
62
|
rescue => ex
|
64
63
|
handle_exception(exception: ex)
|
65
64
|
end
|
66
65
|
|
67
|
-
def default_setup
|
66
|
+
def default_setup
|
68
67
|
copy_existing_files
|
69
68
|
generate_appfile(manually: false)
|
70
69
|
detect_installed_tools # after copying the existing files
|
@@ -72,17 +71,15 @@ module Fastlane
|
|
72
71
|
create_app_if_necessary
|
73
72
|
end
|
74
73
|
enable_deliver
|
75
|
-
FileUtils.mkdir(path)
|
76
74
|
generate_fastfile(manually: false)
|
77
75
|
show_analytics
|
78
76
|
end
|
79
77
|
|
80
|
-
def manual_setup
|
78
|
+
def manual_setup
|
81
79
|
copy_existing_files
|
82
80
|
generate_appfile(manually: true)
|
83
81
|
detect_installed_tools # after copying the existing files
|
84
82
|
ask_to_enable_other_tools
|
85
|
-
FileUtils.mkdir(path)
|
86
83
|
generate_fastfile(manually: true)
|
87
84
|
show_analytics
|
88
85
|
end
|
@@ -130,9 +127,9 @@ module Fastlane
|
|
130
127
|
end
|
131
128
|
|
132
129
|
def show_infos
|
133
|
-
|
134
|
-
|
135
|
-
|
130
|
+
UI.success('This setup will help you get up and running in no time.')
|
131
|
+
UI.success("fastlane will check what tools you're already using and set up")
|
132
|
+
UI.success('the tool automatically for you. Have fun! ')
|
136
133
|
end
|
137
134
|
|
138
135
|
def files_to_copy
|
@@ -145,7 +142,7 @@ module Fastlane
|
|
145
142
|
next unless File.exist?(current)
|
146
143
|
file_name = File.basename(current)
|
147
144
|
to_path = File.join(folder, file_name)
|
148
|
-
|
145
|
+
UI.success("Moving '#{current}' to '#{to_path}'")
|
149
146
|
FileUtils.mv(current, to_path)
|
150
147
|
end
|
151
148
|
end
|
@@ -175,7 +172,7 @@ module Fastlane
|
|
175
172
|
|
176
173
|
path = File.join(folder, 'Appfile')
|
177
174
|
File.write(path, template)
|
178
|
-
|
175
|
+
UI.success("Created new file '#{path}'. Edit it to manage your preferred app metadata information.")
|
179
176
|
end
|
180
177
|
|
181
178
|
# Detect if the app was created on the Dev Portal / iTC
|
@@ -209,7 +206,7 @@ module Fastlane
|
|
209
206
|
ENV['PRODUCE_APPLE_ID'] = Produce::Manager.start_producing
|
210
207
|
rescue => exception
|
211
208
|
if exception.to_s.include?("The App Name you entered has already been used")
|
212
|
-
|
209
|
+
UI.important("It looks like that #{project.app_name} has already been taken by someone else, please enter an alternative.")
|
213
210
|
Produce.config[:app_name] = ask("App Name: ".yellow)
|
214
211
|
Produce.config[:skip_devcenter] = true # since we failed on iTC
|
215
212
|
ENV['PRODUCE_APPLE_ID'] = Produce::Manager.start_producing
|
@@ -225,7 +222,7 @@ module Fastlane
|
|
225
222
|
end
|
226
223
|
|
227
224
|
def enable_deliver
|
228
|
-
|
225
|
+
UI.message("Loading up 'deliver', this might take a few seconds")
|
229
226
|
require 'deliver'
|
230
227
|
require 'deliver/setup'
|
231
228
|
options = FastlaneCore::Configuration.create(Deliver::Options.available_options, {})
|
@@ -251,13 +248,13 @@ module Fastlane
|
|
251
248
|
template.gsub!('[[FASTLANE_VERSION]]', Fastlane::VERSION)
|
252
249
|
|
253
250
|
self.tools.each do |key, value|
|
254
|
-
|
255
|
-
|
251
|
+
UI.message("'#{key}' enabled.".magenta) if value
|
252
|
+
UI.important("'#{key}' not enabled.") unless value
|
256
253
|
end
|
257
254
|
|
258
255
|
path = File.join(folder, 'Fastfile')
|
259
256
|
File.write(path, template)
|
260
|
-
|
257
|
+
UI.success("Created new file '#{path}'. Edit it to manage your own deployment lanes.")
|
261
258
|
end
|
262
259
|
|
263
260
|
def folder
|
@@ -270,12 +267,12 @@ module Fastlane
|
|
270
267
|
from_path = File.join(folder, current)
|
271
268
|
to_path = File.basename(current)
|
272
269
|
if File.exist?(from_path)
|
273
|
-
|
270
|
+
UI.important("Moving '#{from_path}' to '#{to_path}'")
|
274
271
|
FileUtils.mv(from_path, to_path)
|
275
272
|
end
|
276
273
|
end
|
277
274
|
|
278
|
-
|
275
|
+
UI.important("Deleting the 'fastlane' folder")
|
279
276
|
FileUtils.rm_rf(folder)
|
280
277
|
end
|
281
278
|
end
|