25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/scan/commands_generator.rb', line 25
def run
program :version, Scan::VERSION
program :description, Scan::DESCRIPTION
program :help, "Author", "Felix Krause <[email protected]>"
program :help, "Website", "https://fastlane.tools"
program :help, "GitHub", "https://github.com/fastlane/fastlane/tree/master/scan"
program :help_formatter, :compact
global_option("--verbose") { $verbose = true }
command :tests do |c|
c.syntax = "scan"
c.description = Scan::DESCRIPTION
c.action do |_args, options|
config = FastlaneCore::Configuration.create(Scan::Options.available_options,
convert_options(options))
Scan::Manager.new.work(config)
end
end
command :init do |c|
c.syntax = "scan init"
c.description = "Creates a new Scanfile for you"
c.action do |_args, options|
containing = (Helper.fastlane_enabled? ? 'fastlane' : '.')
path = File.join(containing, Scan.scanfile_name)
UI.user_error!("Scanfile already exists").yellow if File.exist?(path)
template = File.read("#{Scan::ROOT}/lib/assets/ScanfileTemplate")
File.write(path, template)
UI.success("Successfully created '#{path}'. Open the file using a code editor.")
end
end
default_command :tests
run!
end
|