fastlane/lib/fastlane/actions/get_build_number.rb in fastlane-2.75.0.beta.20180109010003 vs fastlane/lib/fastlane/actions/get_build_number.rb in fastlane-2.75.0

- old
+ new

@@ -30,10 +30,11 @@ # Store the number in the shared hash Actions.lane_context[SharedValues::BUILD_NUMBER] = build_number end return build_number rescue => ex + return false if params[:hide_error_when_versioning_disabled] UI.error('Before being able to increment and read the version number from your Xcode project, you first need to setup your project properly. Please follow the guide at https://developer.apple.com/library/content/qa/qa1827/_index.html') raise ex end ##################################################### @@ -59,10 +60,15 @@ description: "optional, you must specify the path to your main Xcode project if it is not in the project root directory", optional: true, verify_block: proc do |value| UI.user_error!("Please pass the path to the project, not the workspace") if value.end_with?(".xcworkspace") UI.user_error!("Could not find Xcode project") if !File.exist?(value) and !Helper.is_test? - end) + end), + FastlaneCore::ConfigItem.new(key: :hide_error_when_versioning_disabled, + env_name: "FL_BUILD_NUMBER_HIDE_ERROR_WHEN_VERSIONING_DISABLED", + description: "Used during `fastlane init` to hide the error message", + default_value: false, + type: Boolean) ] end def self.output [