From aee189d46d1da37a353bcbc22e99152e9488c223 Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Wed, 22 Sep 2021 20:05:36 -0700 Subject: [PATCH] fix(appimage): Handle no TRAVIS_TAG or TRAVIS_COMMIT in AppImage build With set u, bash aborts when either is not defined. Also neither is set when building locally. --- appimage/build.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/appimage/build.sh b/appimage/build.sh index 14e1a4a44..a30da45e8 100755 --- a/appimage/build.sh +++ b/appimage/build.sh @@ -171,12 +171,18 @@ cp /usr/lib/x86_64-linux-gnu/libjack.so* "$QTOX_APP_DIR/local/lib" # this is important , aitool automatically uses the same filename in .zsync meta file. # if this name does not match with the one we upload , the update always fails. -if [ -n "$TRAVIS_TAG" ] + +if [ -n "${TRAVIS_TAG-}" ] then - eval "$AITOOL_BIN -u \"$UPDATE_INFO\" $QTOX_APP_DIR qTox-$TRAVIS_TAG.x86_64.AppImage" + VERSION_NAME="${TRAVIS_TAG}" +elif [ -n "${TRAVIS_COMMIT-}" ] +then + VERSION_NAME="${TRAVIS_COMMIT}" else - eval "$AITOOL_BIN -u \"$UPDATE_INFO\" $QTOX_APP_DIR qTox-$TRAVIS_COMMIT-x86_64.AppImage" + VERSION_NAME="${VERSION}" fi +eval "$AITOOL_BIN -u \"$UPDATE_INFO\" $QTOX_APP_DIR qTox-$VERSION_NAME.x86_64.AppImage" + # Chmod since everything is root:root chmod 755 -R "$OUTPUT_DIR"