deliver/lib/deliver/commands_generator.rb in fastlane-2.39.0.beta.20170614010012 vs deliver/lib/deliver/commands_generator.rb in fastlane-2.39.0.beta.20170615010031
- old
+ new
@@ -33,11 +33,10 @@
res ||= ENV["DELIVER_FORCE_OVERWRITE"] # for backward compatibility
res ||= UI.confirm("Do you want to overwrite existing metadata on path '#{File.expand_path(path)}'?") if UI.interactive?
res
end
- # rubocop:disable Metrics/PerceivedComplexity
def run
program :name, 'deliver'
program :version, Fastlane::VERSION
program :description, Deliver::DESCRIPTION
program :help, 'Author', 'Felix Krause <deliver@krausefx.com>'
@@ -133,11 +132,11 @@
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? ? FastlaneCore::FastlaneFolder.path : '.'
+ containing = FastlaneCore::Helper.fastlane_enabled_folder_path
path = options[:screenshots_path] || File.join(containing, 'screenshots')
Deliver::DownloadScreenshots.run(options, path)
end
end
@@ -149,10 +148,10 @@
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...
- containing = FastlaneCore::Helper.fastlane_enabled? ? FastlaneCore::FastlaneFolder.path : '.'
+ containing = FastlaneCore::Helper.fastlane_enabled_folder_path
path = options[:metadata_path] || File.join(containing, 'metadata')
res = Deliver::CommandsGenerator.force_overwrite_metadata?(options, path)
return 0 unless res
require 'deliver/setup'