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.
master
soxx 3 years ago
parent 263142a279
commit 891666ec62
  1. 6
      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') LATEST_GITHUB_RELEASE=$(echo $RELEASES | jq '[.[] | select(.assets | length > 0)] | first')
if [ "$LATEST_GITHUB_RELEASE" == null ]; then if [ "$LATEST_GITHUB_RELEASE" == null ]; then
echo "No github release available" echo "No github release available"
exit 1 exit 0
fi fi
VERSION=$(echo $LATEST_GITHUB_RELEASE | jq -r '.tag_name') 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 if rsync sillywalk.de:/srv/www/sillywalk.de/root/releases/$APK_FILENAME; then
echo "$APK_FILENAME already released. Aborting." echo "$APK_FILENAME already released. Aborting."
exit 1 exit 0
fi fi
KEYSTORE_FILE=$(cat $ANDROID_KEYSTORE_FILE | base64 -w0) 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 if [ -z "$UPLOADED" ]; then
echo "$VERSION already uploaded. Aborting." echo "$VERSION already uploaded. Aborting."
exit 1 exit 0
fi fi
export VERSION export VERSION

Loading…
Cancel
Save