spaceship/lib/spaceship/commands_generator.rb in fastlane_hotfix-2.165.1 vs spaceship/lib/spaceship/commands_generator.rb in fastlane_hotfix-2.187.0
- old
+ new
@@ -1,10 +1,11 @@
require 'highline'
HighLine.track_eof = false
require 'fastlane/version'
+require 'fastlane_core/ui/help_formatter'
require_relative 'playground'
require_relative 'spaceauth_runner'
module Spaceship
class CommandsGenerator
@@ -19,11 +20,11 @@
program :version, Fastlane::VERSION
program :description, Spaceship::DESCRIPTION
program :help, 'Author', 'Felix Krause <spaceship@krausefx.com>'
program :help, 'Website', 'https://fastlane.tools'
program :help, 'GitHub', 'https://github.com/fastlane/fastlane/tree/master/spaceship'
- program :help_formatter, :compact
+ program :help_formatter, FastlaneCore::HelpFormatter
global_option('-u', '--user USERNAME', 'Specify the Apple ID you want to log in with')
global_option('--verbose') { FastlaneCore::Globals.verbose = true }
global_option('--env STRING[,STRING2]', String, 'Add environment(s) to use with `dotenv`')
@@ -37,12 +38,13 @@
end
command :spaceauth do |c|
c.syntax = 'fastlane spaceship spaceauth'
c.description = 'Authentication helper for spaceship/fastlane to work with Apple 2-Step/2FA'
+ c.option('--copy_to_clipboard', 'Whether the session string should be copied to clipboard. For more info see https://docs.fastlane.tools/best-practices/continuous-integration/#storing-a-manually-verified-session-using-spaceauth`')
c.action do |args, options|
- Spaceship::SpaceauthRunner.new(username: options.user).run
+ Spaceship::SpaceauthRunner.new(username: options.user, copy_to_clipboard: options.copy_to_clipboard).run
end
end
default_command(:playground)