1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

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.
This commit is contained in:
Anthony Bilinski 2021-09-22 20:05:36 -07:00
parent 9fa7f2e4b6
commit aee189d46d
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -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"