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

chore(CI): Remove knowledge of build context from AppImage build script

* Since nightlies are now published under qTox/qTox, different update
  info is not needed for the zsync file.
* The github action yaml already handles naming files correctly
  otherwise.
This commit is contained in:
Anthony Bilinski 2022-02-19 00:03:11 -08:00
parent a764aebaf9
commit 41a555def9
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
2 changed files with 6 additions and 25 deletions

View File

@ -224,6 +224,8 @@ jobs:
if: contains(github.ref, 'refs/tags/v')
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
# The zync file names MUST match the pattern "qTox-*.x86_64.AppImage.zsync"
# indefinitely for older versions to be able to update https://github.com/AppImage/AppImageSpec/blob/master/draft.md#github-releases
- name: Rename appimage for release upload
if: contains(github.ref, 'refs/tags/v')
run: |
@ -250,7 +252,7 @@ jobs:
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "qTox-nightly.x86_64.AppImage"
artifacts: "qTox-*.x86_64.AppImage,qTox-*.x86_64.AppImage.zsync"
build-flatpak:
name: Flatpak
runs-on: ubuntu-latest

View File

@ -54,17 +54,8 @@ readonly LOCAL_LIB_DIR="$QTOX_APP_DIR"/local/lib
readonly LDQT_BIN="/usr/lib/qt5/bin/linuxdeployqt"
# update information to be embeded in AppImage
if [ "cron" == "${TRAVIS_EVENT_TYPE:-}" ]
then
# update information for nightly version
readonly NIGHTLY_REPO_SLUG=$(echo "$CIRP_GITHUB_REPO_SLUG" | tr "/" "|")
readonly UPDATE_INFO="gh-releases-zsync|$NIGHTLY_REPO_SLUG|ci-master-latest|qTox-*-x86_64.AppImage.zsync"
else
# update information for stable version
readonly UPDATE_INFO="gh-releases-zsync|qTox|qTox|latest|qTox-*.x86_64.AppImage.zsync"
fi
export VERSION=$(git -C "${QTOX_SRC_DIR}" rev-parse --short HEAD)
readonly UPDATE_INFO="gh-releases-zsync|qTox|qTox|latest|qTox-*.x86_64.AppImage.zsync"
export GIT_VERSION=$(git -C "${QTOX_SRC_DIR}" rev-parse --short HEAD)
echo $QTOX_APP_DIR
cmake "${QTOX_SRC_DIR}" -DDESKTOP_NOTIFICATIONS=ON -DUPDATE_CHECK=ON -DCMAKE_BUILD_TYPE=Release
@ -106,16 +97,4 @@ for lib in "${libs[@]}"; do
patchelf --set-rpath '$ORIGIN' "$LOCAL_LIB_DIR/$lib_file_name"
done
# 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-}" ]
then
VERSION_NAME="${TRAVIS_TAG}"
elif [ -n "${TRAVIS_COMMIT-}" ]
then
VERSION_NAME="${TRAVIS_COMMIT}"
else
VERSION_NAME="${VERSION}"
fi
appimagetool -u "$UPDATE_INFO" $QTOX_APP_DIR qTox-$VERSION_NAME.x86_64.AppImage
appimagetool -u "$UPDATE_INFO" $QTOX_APP_DIR qTox-${GIT_VERSION}.x86_64.AppImage