Skip to content

Commit 48a5cee

Browse files
committed
fix: correct argument parsing for version increment types
- Fix argument parsing to properly handle 'patch', 'minor', 'major' as increment types - Previously these were being treated as literal version strings - Now correctly identifies increment types vs explicit versions
1 parent bcd2b56 commit 48a5cee

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/release.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,11 +414,15 @@ main() {
414414
exit 1
415415
;;
416416
*)
417-
if [ -n "$version" ]; then
417+
# Check if this looks like a version increment type
418+
if [[ "$1" == "patch" || "$1" == "minor" || "$1" == "major" ]]; then
419+
increment_type="$1"
420+
elif [ -n "$version" ]; then
418421
print_error "Multiple versions specified"
419422
exit 1
423+
else
424+
version=$1
420425
fi
421-
version=$1
422426
shift
423427
;;
424428
esac

0 commit comments

Comments
 (0)