fix_: make sure tag version works if no args are passed

This commit is contained in:
Andrea Maria Piana 2024-04-10 12:18:30 +01:00
parent a9228df085
commit fc846211b7
No known key found for this signature in database
1 changed files with 5 additions and 4 deletions

View File

@ -41,11 +41,12 @@ calculate_new_version() {
main() { main() {
target_commit=${1:-HEAD} new_version=$(calculate_new_version "$1")
new_version=$(calculate_new_version "$target_commit")
echo "calculated new version: $new_version" >&2 echo "calculated new version: $new_version" >&2
git tag -a "$new_version" "$target_commit" -m "release $target_commit" git tag -a "$new_version" "$1" -m "release $new_version"
} }
main "$1" target_commit=${1:-HEAD}
main "$target_commit"