From 9293768ee2f4ab8c29f58fb4dbf6f572d6df9f34 Mon Sep 17 00:00:00 2001 From: autoupdate Date: Wed, 26 Jul 2023 19:33:15 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=20(autoupdate)=20Move=20auto=20update?= =?UTF-8?q?=20git=20code=20to=20autoupdate.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autoupdate.sh | 10 ++++++++++ update-new-version.sh | 25 +------------------------ 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/autoupdate.sh b/autoupdate.sh index f4a068b..c2a741a 100755 --- a/autoupdate.sh +++ b/autoupdate.sh @@ -18,3 +18,13 @@ new_version="$(echo "$check" | xmllint --xpath 'string(/dehs/upstream-version)' popd ./update-new-version.sh --autoupdate "$new_version" + +git add -A +git commit -m "Upstream version $new_version" + +git switch main +git merge --ff-only version-"$new_version" +git push origin main + +git tag -a v"$new_version" -m "Upstream version $new_version" +git push --tags origin main diff --git a/update-new-version.sh b/update-new-version.sh index 2e91dfe..0da0bdd 100755 --- a/update-new-version.sh +++ b/update-new-version.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash # # This script intends to decrease the effort of updating the package. -# -# Passing "--autoupdate" as first argument triggers automatic Git operations. set -euo pipefail @@ -18,14 +16,7 @@ DISTRIBUTION="lunar" last_tag=$(git describe --abbrev=0 --tags) old="${last_tag#?}" - -if [ "$1" = "--autoupdate" ]; then - new="$2" - autoupdate="y" -else - new="$1" - autoupdate="n" -fi +new="$1" name="$(git config --get user.name)" email="$(git config --get user.email)" @@ -51,17 +42,3 @@ debuild -us -uc cd .. rm "$PACKAGE"_"$old"-* - -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 -a v"$new" -m "Upstream version $new" -git push --tags origin main