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