Skip to content

Commit 00d4d30

Browse files
committed
Add hotfix version validation
1 parent 7a189e9 commit 00d4d30

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fastlane/lanes/release.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@
212212

213213
# Parse the provided version into an AppVersion object
214214
parsed_version = VERSION_FORMATTER.parse(new_version)
215+
# Validate that this is a hotfix version (must have a patch component > 0)
216+
UI.user_error!("Invalid hotfix version '#{new_version}'. Must include a patch number.") unless parsed_version.patch.to_i.positive?
215217
previous_version = VERSION_FORMATTER.release_version(VERSION_CALCULATOR.previous_patch_version(version: parsed_version))
216218
previous_release_branch = "release/#{previous_version}"
217219

0 commit comments

Comments
 (0)