bin/deliver in deliver-0.9.1 vs bin/deliver in deliver-0.9.2

- old
+ new

@@ -10,11 +10,11 @@ class FastlaneApplication include Commander::Methods def run program :version, Deliver::VERSION - program :description, 'CLI for \'Deliver\' - Upload screenshots, metadata and your app to the App Store using a single command' + program :description, 'CLI for \'deliver\' - Upload screenshots, metadata and your app to the App Store using a single command' program :help, 'Author', 'Felix Krause <deliver@krausefx.com>' program :help, 'Website', 'https://fastlane.tools' program :help, 'GitHub', 'https://github.com/krausefx/deliver' program :help_formatter, :compact @@ -26,12 +26,10 @@ command :run do |c| c.syntax = 'deliver' c.description = 'Run a deploy process using the Deliverfile in the current folder' c.action do |args, options| - FastlaneCore::UpdateChecker.start_looking_for_update('deliver') - path = (Deliver::Helper.fastlane_enabled?? './fastlane' : '.') Dir.chdir(path) do # switch the context if File.exists?(deliver_path) # Everything looks alright, use the given Deliverfile options.default :beta => false, :skip_deploy => false @@ -41,12 +39,10 @@ if agree("Do you want to create a new Deliverfile at the current directory? (y/n)", true) Deliver::DeliverfileCreator.create(enclosed_directory) end end end - - FastlaneCore::UpdateChecker.show_update_status('deliver', Deliver::VERSION) end end command :init do |c| c.syntax = 'deliver init' @@ -66,19 +62,15 @@ c.description = "Uploads a given ipa file to the new Apple TestFlight" c.option '-a', '--app_id String', String, 'The App ID (numeric, like 956814360)' c.option '-u', '--username String', String, 'Your Apple ID' c.action do |args, options| - FastlaneCore::UpdateChecker.start_looking_for_update('deliver') - ipa_path = (args.first || determine_ipa) + '' # unfreeze the string set_username(options.username) Deliver::Testflight.upload!(ipa_path, options.app_id, options.skip_deploy) - - FastlaneCore::UpdateChecker.show_update_status('deliver', Deliver::VERSION) end end def set_username(username) user = username @@ -105,6 +97,11 @@ # The directoy in which the Deliverfile and metadata should be created def enclosed_directory "." end -FastlaneApplication.new.run +begin + FastlaneCore::UpdateChecker.start_looking_for_update('deliver') + FastlaneApplication.new.run +ensure + FastlaneCore::UpdateChecker.show_update_status('deliver', Deliver::VERSION) +end \ No newline at end of file