fastlane/lib/fastlane/actions/increment_version_number.rb in fastlane-2.137.0 vs fastlane/lib/fastlane/actions/increment_version_number.rb in fastlane-2.138.0
- old
+ new
@@ -41,10 +41,13 @@
else
UI.user_error!(version_format_error(current_version)) unless current_version =~ version_regex
version_array = current_version.split(".").map(&:to_i)
case params[:bump_type]
+ when "bump"
+ version_array[-1] = version_array[-1] + 1
+ next_version_number = version_array.join(".")
when "patch"
UI.user_error!(version_token_error) if version_array.count < 3
version_array[2] = version_array[2] + 1
next_version_number = version_array.join(".")
when "minor"
@@ -107,13 +110,13 @@
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :bump_type,
env_name: "FL_VERSION_NUMBER_BUMP_TYPE",
description: "The type of this version bump. Available: patch, minor, major",
- default_value: "patch",
+ default_value: "bump",
verify_block: proc do |value|
- UI.user_error!("Available values are 'patch', 'minor' and 'major'") unless ['patch', 'minor', 'major'].include?(value)
+ UI.user_error!("Available values are 'patch', 'minor' and 'major'") unless ['bump', 'patch', 'minor', 'major'].include?(value)
end),
FastlaneCore::ConfigItem.new(key: :version_number,
env_name: "FL_VERSION_NUMBER_VERSION_NUMBER",
description: "Change to a specific version. This will replace the bump type value",
optional: true),
@@ -146,10 +149,10 @@
"serluca"
end
def self.example_code
[
- 'increment_version_number # Automatically increment patch version number',
+ 'increment_version_number # Automatically increment version number',
'increment_version_number(
bump_type: "patch" # Automatically increment patch version number
)',
'increment_version_number(
bump_type: "minor" # Automatically increment minor version number