deliver/lib/deliver/commands_generator.rb in fastlane-2.16.0 vs deliver/lib/deliver/commands_generator.rb in fastlane-2.17.0

- old
+ new

@@ -35,19 +35,20 @@ program :help, 'Author', 'Felix Krause <deliver@krausefx.com>' program :help, 'Website', 'https://fastlane.tools' program :help, 'GitHub', 'https://github.com/fastlane/fastlane/tree/master/deliver' program :help_formatter, :compact - FastlaneCore::CommanderGenerator.new.generate(deliverfile_options) - global_option('--verbose') { FastlaneCore::Globals.verbose = true } always_trace! command :run do |c| c.syntax = 'fastlane deliver' c.description = 'Upload metadata and binary to iTunes Connect' + + FastlaneCore::CommanderGenerator.new.generate(deliverfile_options, command: c) + c.action do |args, options| options = FastlaneCore::Configuration.create(deliverfile_options, options.__hash__) loaded = options.load_configuration_file("Deliverfile") loaded = true if options[:description] || options[:ipa] || options[:pkg] # do we have *anything* here? unless loaded @@ -60,24 +61,32 @@ end Deliver::Runner.new(options).run end end + command :submit_build do |c| c.syntax = 'fastlane deliver submit_build' c.description = 'Submit a specific build-nr for review, use latest for the latest build' + + FastlaneCore::CommanderGenerator.new.generate(deliverfile_options, command: c) + c.action do |args, options| options = FastlaneCore::Configuration.create(deliverfile_options, options.__hash__) options.load_configuration_file("Deliverfile") options[:submit_for_review] = true options[:build_number] = "latest" unless options[:build_number] Deliver::Runner.new(options).run end end + command :init do |c| c.syntax = 'fastlane deliver init' c.description = 'Create the initial `deliver` configuration based on an existing app' + + FastlaneCore::CommanderGenerator.new.generate(deliverfile_options, command: c) + c.action do |args, options| if File.exist?("Deliverfile") or File.exist?("fastlane/Deliverfile") UI.important("You already have a running deliver setup in this directory") return 0 end @@ -90,10 +99,13 @@ end command :generate_summary do |c| c.syntax = 'fastlane deliver generate_summary' c.description = 'Generate HTML Summary without uploading/downloading anything' + + FastlaneCore::CommanderGenerator.new.generate(deliverfile_options, command: c) + c.action do |args, options| options = FastlaneCore::Configuration.create(deliverfile_options, options.__hash__) options.load_configuration_file("Deliverfile") Deliver::Runner.new(options) html_path = Deliver::GenerateSummary.new.run(options) @@ -104,10 +116,12 @@ command :download_screenshots do |c| c.syntax = 'fastlane deliver download_screenshots' c.description = "Downloads all existing screenshots from iTunes Connect and stores them in the screenshots folder" + FastlaneCore::CommanderGenerator.new.generate(deliverfile_options, command: c) + c.action do |args, options| options = FastlaneCore::Configuration.create(deliverfile_options(skip_verification: true), options.__hash__) options.load_configuration_file("Deliverfile") Deliver::Runner.new(options, skip_version: true) # to login... containing = FastlaneCore::Helper.fastlane_enabled? ? './fastlane' : '.' @@ -117,9 +131,11 @@ end command :download_metadata do |c| c.syntax = 'fastlane deliver download_metadata' c.description = "Downloads existing metadata and stores it locally. This overwrites the local files." + + FastlaneCore::CommanderGenerator.new.generate(deliverfile_options, command: c) c.action do |args, options| options = FastlaneCore::Configuration.create(deliverfile_options(skip_verification: true), options.__hash__) options.load_configuration_file("Deliverfile") Deliver::Runner.new(options) # to login...