diff options
author | relrel | 2020-11-26 11:22:22 +0000 |
---|---|---|
committer | relrel | 2020-11-26 11:22:22 +0000 |
commit | 28b519bbe6c0e1e790b842001819c495369110d0 (patch) | |
tree | 4580f491b93adac3e264926951b617eaff1aecc3 | |
parent | 80bfcde85cc4a516c01bf28c48121bbea5c7ae2b (diff) | |
download | aur-28b519bbe6c0e1e790b842001819c495369110d0.tar.gz |
Update update.sh
-rwxr-xr-x | update.sh | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/update.sh b/update.sh index 9e706db47f25..457be9824996 100755 --- a/update.sh +++ b/update.sh @@ -1,22 +1,25 @@ #!/bin/sh set -euo pipefail - cd "$(dirname "$0")" -CHROMIUM_VERSION=$(curl -sSf "https://omahaproxy.appspot.com/linux") -V8_VERSION=$(curl -sSf "https://omahaproxy.appspot.com/v8.json?version=$CHROMIUM_VERSION" | jq -r '.v8_version') +if [ -n "$(git status --porcelain)" ]; then + echo "Working directory is not clean" + exit 1 +fi +git pull -sed -e "s/^pkgver=.*/pkgver=$V8_VERSION/" \ - -e 's/pkgrel=.*/pkgrel=1/' \ - -i PKGBUILD -if (git diff --quiet PKGBUILD); then +CHROMIUM_VERSION=$(curl -sSf "https://omahaproxy.appspot.com/linux") +V8_VERSION=$(curl -sSf "https://omahaproxy.appspot.com/v8.json?version=$CHROMIUM_VERSION" | jq -r ".v8_version") +sed -e "s/^pkgver=.*/pkgver=$V8_VERSION/" -i PKGBUILD +if [ -z "$(git status --porcelain)" ]; then echo "Nothing to do" - exit + exit 1 fi +sed -e "s/^pkgrel=.*/pkgrel=1/" -i PKGBUILD echo "Updating to $V8_VERSION..." +updpkgsums makepkg --printsrcinfo > .SRCINFO -git restore --staged . -git add PKGBUILD .SRCINFO -git commit -m "Update to $V8_VERSION" +git commit -am "Update to $V8_VERSION" +git push |