Skip to content

Commit 4d48dda

Browse files
committed
Add hotfix version validation
1 parent cad9603 commit 4d48dda

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
@@ -277,6 +277,8 @@
277277

278278
# Parse the provided version into an AppVersion object
279279
parsed_version = VERSION_FORMATTER.parse(new_version)
280+
# Validate that this is a hotfix version (must have a patch component > 0)
281+
UI.user_error!("Invalid hotfix version '#{new_version}'. Must include a patch number.") unless parsed_version.patch.to_i.positive?
280282
previous_version = VERSION_FORMATTER.release_version(VERSION_CALCULATOR.previous_patch_version(version: parsed_version))
281283
previous_release_branch = compute_release_branch_name(options: options, version: previous_version)
282284

0 commit comments

Comments
 (0)