lib/deliver/commands_generator.rb in deliver-1.0.0.beta2 vs lib/deliver/commands_generator.rb in deliver-1.0.0.beta3

- old
+ new

@@ -31,10 +31,20 @@ command :run do |c| c.syntax = 'deliver' c.description = 'Upload metadata and binary to iTunes Connect' c.action do |args, options| options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__) - options.load_configuration_file("Deliverfile") + loaded = options.load_configuration_file("Deliverfile") + loaded = true if options[:description] || options[:ipa] # do we have *anything* here? + unless loaded + if agree("No deliver configuration found in the current directory. Do you want to setup deliver? (y/n)".yellow, true) + require 'deliver/setup' + Deliver::Runner.new(options) # to login... + Deliver::Setup.new.run(options) + return 0 + end + end + Deliver::Runner.new(options).run end end command :init do |c|