diff --git a/update-new-version.sh b/update-new-version.sh index c3b0865..bbba768 100755 --- a/update-new-version.sh +++ b/update-new-version.sh @@ -21,10 +21,10 @@ old="${last_tag#?}" if [ "$1" = "--autoupdate" ]; then new="$2" - autoupdate="y" + autogit="y" else new="$1" - autoupdate="n" + autogit="n" fi name="$(git config --get user.name)" @@ -52,16 +52,13 @@ cd .. rm "$PACKAGE"_"$old"-* -if [ "$autoupdate" = "n" ]; then +if [ "$autogit" = "n" ]; then exit fi -git add -A -git commit -m "Upstream version $new" - git switch main git merge --ff-only version-"$new" git push origin main -git tag -a v"$new" "Upstream version $new" +git tag -s v"$new" "Upstream version $new" git push --tags origin main