aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xupdate1
-rwxr-xr-xupload10
2 files changed, 10 insertions, 1 deletions
diff --git a/update b/update
index f67e58383fe8..70baee79b68e 100755
--- a/update
+++ b/update
@@ -45,6 +45,7 @@ else
makepkg -rs
if ! ls *.zst &> /dev/null ; then
echo "Package creation failure"
+ sed -i "s/pkgver=.*/pkgver=INVALID/" PKGBUILD
exit 2
fi
makepkg --printsrcinfo > .SRCINFO
diff --git a/upload b/upload
index f94e94cb7b5f..dc84dee95c88 100755
--- a/upload
+++ b/upload
@@ -14,10 +14,18 @@ done
SCRIPT_HOME=`dirname "$PRG"`
$SCRIPT_HOME/update
-if [ "$?" -eq 1 ]; then
+EXIT_CODE=$?
+if [ $EXIT_CODE -eq 0 ]; then
+ echo "Package is already up to date"
+ exit 0
+elif [ $EXIT_CODE -eq 1 ]; then
+ set -e
echo "Updating Git"
cd $SCRIPT_HOME
ver="$(grep pkgver= PKGBUILD | sed 's/.*=//g')"
git commit -a -m "Update to $ver"
git push
+elif [ $EXIT_CODE -eq 2 ]; then
+ echo "update script failed with exit code 2"
+ exit 2
fi