Skip to content

Commit

Permalink
Merge pull request #205 from cisagov/bugfix/allow_bump-version_to_bum…
Browse files Browse the repository at this point in the history
…p_prereleases

Ensure the `bump-version` script can bump pre-releases
  • Loading branch information
mcdonnnj authored Jan 12, 2025
2 parents 0d48ebd + 59c6cfc commit f26b47c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bump-version
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ if [ -n "$label" ] && [ "$with_prerelease" = false ] && [[ ! " ${commands_with_l
invalid_option "Setting the label is only allowed for the following commands: ${commands_with_label[*]}"
fi

if [ "$with_prerelease" = true ] && [[ ! " ${commands_with_prerelease[*]} " =~ [[:space:]]${bump_part}[[:space:]] ]]; then
if [ "$with_prerelease" = true ] && [ -n "$bump_part" ] && [[ ! " ${commands_with_prerelease[*]} " =~ [[:space:]]${bump_part}[[:space:]] ]]; then
invalid_option "Changing the prerelease is only allowed in conjunction with the following commands: ${commands_with_prerelease[*]}"
fi

Expand Down

0 comments on commit f26b47c

Please sign in to comment.