From 891666ec62fa7747d1ffe37a2920ef54e4ac8d54 Mon Sep 17 00:00:00 2001 From: soxx Date: Mon, 5 Jun 2023 19:03:22 +0200 Subject: [PATCH] Don't fail if there's nothing to do I don't want the unit to fail if there is nothing to build, esp. since it reports failures via email, and i have no need to distinguish between different exit conditions right now. --- build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 0e9cff7..cafc3c0 100755 --- a/build.sh +++ b/build.sh @@ -8,7 +8,7 @@ RELEASES="$(curl -s https://api.github.com/repos/M66B/FairEmail/releases)" LATEST_GITHUB_RELEASE=$(echo $RELEASES | jq '[.[] | select(.assets | length > 0)] | first') if [ "$LATEST_GITHUB_RELEASE" == null ]; then echo "No github release available" - exit 1 + exit 0 fi VERSION=$(echo $LATEST_GITHUB_RELEASE | jq -r '.tag_name') @@ -16,7 +16,7 @@ APK_FILENAME=$(echo $LATEST_GITHUB_RELEASE | jq -r '.assets[0].name') if rsync sillywalk.de:/srv/www/sillywalk.de/root/releases/$APK_FILENAME; then echo "$APK_FILENAME already released. Aborting." - exit 1 + exit 0 fi KEYSTORE_FILE=$(cat $ANDROID_KEYSTORE_FILE | base64 -w0) @@ -37,7 +37,7 @@ UPLOADED=$(rsync -i --ignore-existing apk/$APK_FILENAME sillywalk.de:/srv/www/si if [ -z "$UPLOADED" ]; then echo "$VERSION already uploaded. Aborting." - exit 1 + exit 0 fi export VERSION