fastlane/lib/fastlane/commands_generator.rb in fastlane-2.74.1 vs fastlane/lib/fastlane/commands_generator.rb in fastlane-2.75.0.beta.20180109010003
- old
+ new
@@ -55,23 +55,23 @@
end
end
def self.confirm_troubleshoot
if Helper.is_ci?
- UI.error "---"
- UI.error "You are trying to use '--troubleshoot' on CI"
- UI.error "this option is not usable in CI, as it is insecure"
- UI.error "---"
+ UI.error("---")
+ UI.error("You are trying to use '--troubleshoot' on CI")
+ UI.error("this option is not usable in CI, as it is insecure")
+ UI.error("---")
UI.user_error!("Do not use --troubleshoot in CI")
end
# maybe already set by 'start'
return if $troubleshoot
- UI.error "---"
- UI.error "Are you sure you want to enable '--troubleshoot'?"
- UI.error "All commmands will run in full unfiltered output mode."
- UI.error "Sensitive data, like passwords, could be printed to the log."
- UI.error "---"
+ UI.error("---")
+ UI.error("Are you sure you want to enable '--troubleshoot'?")
+ UI.error("All commmands will run in full unfiltered output mode.")
+ UI.error("Sensitive data, like passwords, could be printed to the log.")
+ UI.error("---")
if UI.confirm("Do you really want to enable --troubleshoot")
$troubleshoot = true
end
end
@@ -98,11 +98,11 @@
always_trace!
command :trigger do |c|
c.syntax = 'fastlane [lane]'
c.description = 'Run a specific lane. Pass the lane name and optionally the platform first.'
- c.option '--env STRING[,STRING2]', String, 'Add environment(s) to use with `dotenv`'
+ c.option('--env STRING[,STRING2]', String, 'Add environment(s) to use with `dotenv`')
c.action do |args, options|
if ensure_fastfile
Fastlane::CommandLineHandler.handle(args, options)
end
@@ -111,11 +111,11 @@
command :init do |c|
c.syntax = 'fastlane init'
c.description = 'Helps you with your initial fastlane setup'
- c.option '-u STRING', '--user STRING', String, 'iOS projects only: Your Apple ID'
+ c.option('-u STRING', '--user STRING', String, 'iOS projects only: Your Apple ID')
CrashlyticsBetaCommandLineHandler.apply_options(c)
c.action do |args, options|
if args[0] == 'beta'
@@ -129,33 +129,33 @@
end
command :init_swift do |c|
c.syntax = 'fastlane init_swift'
c.description = 'Helps you with your initial fastlane setup for Swift'
- c.option '-u STRING', '--user STRING', String, 'iOS projects only: Your Apple ID'
+ c.option('-u STRING', '--user STRING', String, 'iOS projects only: Your Apple ID')
c.action do |args, options|
Fastlane::Setup.new.run(user: options.user, is_swift_fastfile: true)
end
end
command :new_action do |c|
c.syntax = 'fastlane new_action'
c.description = 'Create a new custom action for fastlane.'
- c.option '--name STRING', String, 'Name of your new action'
+ c.option('--name STRING', String, 'Name of your new action')
c.action do |args, options|
Fastlane::NewAction.run(new_action_name: options.name)
end
end
command :socket_server do |c|
c.syntax = 'fastlane start_server'
c.description = 'Starts local socket server and enables only a single local connection'
- c.option '-s', '--stay_alive', 'Keeps socket server up even after error or disconnects, requires CTRL-C to kill.'
- c.option '-c seconds', '--connection_timeout', 'Sets connection established timeout'
+ c.option('-s', '--stay_alive', 'Keeps socket server up even after error or disconnects, requires CTRL-C to kill.')
+ c.option('-c seconds', '--connection_timeout', 'Sets connection established timeout')
c.action do |args, options|
default_connection_timeout = 5
stay_alive = options.stay_alive || false
connection_timeout = options.connection_timeout || default_connection_timeout
@@ -171,18 +171,18 @@
command_executor: command_executor,
connection_timeout: connection_timeout,
stay_alive: stay_alive
)
result = server.start
- UI.success "Result: #{result}" if result
+ UI.success("Result: #{result}") if result
end
end
command :lanes do |c|
c.syntax = 'fastlane lanes'
c.description = 'Lists all available lanes and shows their description'
- c.option "-j", "--json", "Output the lanes in JSON instead of text"
+ c.option("-j", "--json", "Output the lanes in JSON instead of text")
c.action do |args, options|
if options.json || ensure_fastfile
require 'fastlane/lane_list'
path = FastlaneCore::FastlaneFolder.fastfile_path
@@ -200,28 +200,28 @@
c.syntax = 'fastlane list'
c.description = 'Lists all available lanes without description'
c.action do |args, options|
if ensure_fastfile
ff = Fastlane::FastFile.new(FastlaneCore::FastlaneFolder.fastfile_path)
- UI.message "Available lanes:"
+ UI.message("Available lanes:")
ff.runner.available_lanes.each do |lane|
- UI.message "- #{lane}"
+ UI.message("- #{lane}")
end
- UI.important "Execute using `fastlane [lane_name]`"
+ UI.important("Execute using `fastlane [lane_name]`")
end
end
end
command :docs do |c|
c.syntax = 'fastlane docs'
c.description = 'Generate a markdown based documentation based on the Fastfile'
- c.option '-f', '--force', 'Overwrite the existing README.md in the ./fastlane folder'
+ c.option('-f', '--force', 'Overwrite the existing README.md in the ./fastlane folder')
c.action do |args, options|
if ensure_fastfile
ff = Fastlane::FastFile.new(File.join(FastlaneCore::FastlaneFolder.path || '.', 'Fastfile'))
- UI.message "You don't need to run `fastlane docs` manually any more, this will be done automatically for you when running a lane."
+ UI.message("You don't need to run `fastlane docs` manually any more, this will be done automatically for you when running a lane.")
Fastlane::DocsGenerator.run(ff)
end
end
end
@@ -230,19 +230,19 @@
c.description = 'Run a fastlane one-off action without a full lane'
c.action do |args, options|
require 'fastlane/one_off'
result = Fastlane::OneOff.execute(args: args)
- UI.success "Result: #{result}" if result
+ UI.success("Result: #{result}") if result
end
end
command :actions do |c|
c.syntax = 'fastlane actions'
c.description = 'Lists all available fastlane actions'
- c.option '--platform STRING', String, 'Only show actions available on the given platform'
+ c.option('--platform STRING', String, 'Only show actions available on the given platform')
c.action do |args, options|
require 'fastlane/documentation/actions_list'
Fastlane::ActionsList.run(filter: args.first, platform: options.platform)
end
@@ -258,11 +258,11 @@
end
command :enable_auto_complete do |c|
c.syntax = 'fastlane enable_auto_complete'
c.description = 'Enable tab auto completion'
- c.option '-c STRING[,STRING2]', '--custom STRING[,STRING2]', String, 'Add custom command(s) for which tab auto complete should be enabled too'
+ c.option('-c STRING[,STRING2]', '--custom STRING[,STRING2]', String, 'Add custom command(s) for which tab auto complete should be enabled too')
c.action do |args, options|
require 'fastlane/auto_complete'
Fastlane::AutoComplete.execute(args, options)
end
@@ -340,10 +340,10 @@
search_query = args.last
PluginSearch.print_plugins(search_query: search_query)
end
end
- default_command :trigger
+ default_command(:trigger)
run!
end
# Makes sure a Fastfile is available
# Shows an appropriate message to the user