summarylogtreecommitdiffstats
path: root/prepare_update.sh
diff options
context:
space:
mode:
authorHetsh2022-04-06 09:14:25 +0200
committerHetsh2022-04-06 09:14:25 +0200
commite3140ced6a5bf8d675bc0778c25ac8cad00d47c2 (patch)
treef5a33577f3b1dc7fe0e74de265af327b5647e5d7 /prepare_update.sh
parent59a7326a7036c7e8737284643b8c210bac76b59e (diff)
downloadaur-e3140ced6a5bf8d675bc0778c25ac8cad00d47c2.tar.gz
Import from @peterfab9845
Diffstat (limited to 'prepare_update.sh')
-rwxr-xr-xprepare_update.sh19
1 files changed, 4 insertions, 15 deletions
diff --git a/prepare_update.sh b/prepare_update.sh
index e33dbfdd2cc3..554d496050fc 100755
--- a/prepare_update.sh
+++ b/prepare_update.sh
@@ -17,22 +17,11 @@ source "$BUILD_FILE"
if [ "$1" == "--aur-only" ]
then
echo "Only updating \$pkgrel!"
+ sed -i "s|pkgrel\=.*|pkgrel\=$((pkgrel+1))|" "$BUILD_FILE"
else
- # Replace with latest commit to master branch
- LATEST_COMMIT=$(git ls-remote "$url" master | cut -f 1)
- if [ "$commit" = "$LATEST_COMMIT" ]
- then
- echo "Already on latest commit!"
- exit 3
- fi
- sed -i "s|commit\=.*|commit\=('$LATEST_COMMIT')|" "$BUILD_FILE"
-
- # Update package checksum
- PKG_SHA=$(curl -L -s "$url/archive/$LATEST_COMMIT.tar.gz" | sha256sum | cut -d " " -f 1)
- sed -i "s|sha256sums\=.*|sha256sums\=('$PKG_SHA')|" "$BUILD_FILE"
+ sed -i "s|pkgrel\=.*|pkgrel\=1|" "$BUILD_FILE"
+ # Have makepkg update the version using pkgver()
+ makepkg -o
fi
-# Increment pkgrel on every "release"
-sed -i "s|pkgrel\=.*|pkgrel\=$((pkgrel+1))|" "$BUILD_FILE"
-
makepkg --printsrcinfo > .SRCINFO