fix_: make sure tag version works if no args are passed
This commit is contained in:
parent
a9228df085
commit
fc846211b7
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue