lib/deliver/commands_generator.rb in deliver-1.10.2 vs lib/deliver/commands_generator.rb in deliver-1.10.3

- old
+ new

@@ -63,11 +63,11 @@ command :init do |c| c.syntax = 'deliver init' c.description = 'Create the initial `deliver` configuration based on an existing app' c.action do |args, options| if File.exist?("Deliverfile") or File.exist?("fastlane/Deliverfile") - Ui.important("You already got a running deliver setup in this directory") + UI.important("You already got a running deliver setup in this directory") return 0 end require 'deliver/setup' options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__) @@ -95,11 +95,12 @@ c.action do |args, options| options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__) options.load_configuration_file("Deliverfile") Deliver::Runner.new(options) # to login... - path = options[:screenshots_path] || (FastlaneCore::Helper.fastlane_enabled? ? './fastlane' : '.') + containing = FastlaneCore::Helper.fastlane_enabled? ? './fastlane' : '.' + path = options[:screenshots_path] || File.join(containing, 'screenshots') Deliver::DownloadScreenshots.run(options, path) end end command :download_metadata do |c| @@ -108,12 +109,13 @@ c.action do |args, options| options = FastlaneCore::Configuration.create(Deliver::Options.available_options, options.__hash__) options.load_configuration_file("Deliverfile") Deliver::Runner.new(options) # to login... - path = options[:metadata_path] || (FastlaneCore::Helper.fastlane_enabled? ? './fastlane' : '.') + containing = FastlaneCore::Helper.fastlane_enabled? ? './fastlane' : '.' + path = options[:metadata_path] || File.join(containing, 'metadata') res = ENV["DELIVER_FORCE_OVERWRITE"] - res ||= UI.confirm("Do you want to overwrite existing metadata on path '#{File.expand_path(path)}/metadata'?") + res ||= UI.confirm("Do you want to overwrite existing metadata on path '#{File.expand_path(path)}'?") if res require 'deliver/setup' v = options[:app].latest_version Deliver::Setup.new.generate_metadata_files(v, path) else