lib/deliver/detect_values.rb in deliver-1.14.5 vs lib/deliver/detect_values.rb in deliver-1.15.0

- old
+ new

@@ -1,12 +1,12 @@ module Deliver class DetectValues - def run!(options) + def run!(options, skip_params = {}) find_app_identifier(options) find_app(options) find_folders(options) - find_version(options) + find_version(options) unless skip_params[:skip_version] end def find_app_identifier(options) return if options[:app_identifier] @@ -16,10 +16,12 @@ identifier = FastlaneCore::PkgFileAnalyser.fetch_app_identifier(options[:pkg]) end options[:app_identifier] = identifier if identifier.to_s.length > 0 options[:app_identifier] ||= UI.input("The Bundle Identifier of your App: ") + rescue + UI.user_error!("Could not infer your App's Bundle Identifier") end def find_app(options) search_by = options[:app_identifier] search_by = options[:app] if search_by.to_s.length == 0 @@ -39,13 +41,17 @@ FileUtils.mkdir_p(options[:screenshots_path]) FileUtils.mkdir_p(options[:metadata_path]) end def find_version(options) + return if options[:app_version] + if options[:ipa] options[:app_version] ||= FastlaneCore::IpaFileAnalyser.fetch_app_version(options[:ipa]) elsif options[:pkg] options[:app_version] ||= FastlaneCore::PkgFileAnalyser.fetch_app_version(options[:pkg]) end + rescue + UI.user_error!("Could not infer your app's version") end end end