Add update info to AppImage (#42)
- Commit
9ec9e6723c756628c98c2af30cbefcd19430f386- Author
- Kabir Oberai <[email protected]>
- When
- 2025-05-15 19:19 UTC (1 year ago)
- Parents
54d03f5
Diff
.github/workflows/release.yml
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 371fd1b..36fd0a4 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -19,12 +19,14 @@ jobs: uses: actions/checkout@v4 - name: Build run: |- docker compose run --build --rm xtool bash -c "Linux/build.sh && mv Linux/packages/xtool{,-${{ matrix.host.arch }}}.AppImage"+ docker compose run --build --rm xtool Linux/build.sh - name: Upload artifact uses: actions/upload-artifact@v4 with: name: xtool-${{ matrix.host.arch }}- path: Linux/packages/xtool-${{ matrix.host.arch }}.AppImage+ path: |+ Linux/packages/xtool-${{ matrix.host.arch }}.AppImage+ Linux/packages/xtool-${{ matrix.host.arch }}.AppImage.zsync build-mac: runs-on: macos-15 permissions:@@ -72,4 +74,4 @@ jobs: run: | TAG="${GITHUB_REF##*/}-${GITHUB_SHA:0:7}" gh release create "$TAG" --draft --title "Draft Release"- gh release upload "$TAG" output/**/*.{AppImage,app.zip,app.dSYM.zip}+ gh release upload "$TAG" output/**/*.{AppImage,AppImage.zsync,app.zip,app.dSYM.zip}
Linux/build.sh
diff --git a/Linux/build.sh b/Linux/build.shindex a595689..b21798a 100755--- a/Linux/build.sh+++ b/Linux/build.sh@@ -5,8 +5,8 @@ shopt -s nullglob cd "$(dirname "$0")" -# installer version-export LINUXDEPLOY_OUTPUT_VERSION="1.0.0"+# release version+export LINUXDEPLOY_OUTPUT_VERSION="latest" if ! command -v fusermount &>/dev/null; then # Docker doesn't support FUSE@@ -21,6 +21,7 @@ bin="$(swift build --package-path .. -c release --show-bin-path)" strip "${bin}/xtool" curr_git_info="$(curl -fsSL https://api.github.com/repos/linuxdeploy/linuxdeploy/git/refs/tags/continuous)"+curr_arch="$(uname -m)" if [[ -f staging/linuxdeploy/git.json ]]; then if ! cmp -s staging/linuxdeploy/git.json <(echo "$curr_git_info"); then@@ -33,7 +34,7 @@ else fi if [[ ! -f staging/linuxdeploy/linuxdeploy.AppImage ]]; then- curl -fsSL "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$(arch).AppImage" \+ curl -fsSL "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${curr_arch}.AppImage" \ -o staging/linuxdeploy/linuxdeploy.AppImage chmod +x staging/linuxdeploy/linuxdeploy.AppImage echo "$curr_git_info" > staging/linuxdeploy/git.json@@ -42,14 +43,18 @@ fi mkdir -p staging/tmp/AppDir/usr/bin find "${bin}"/ -name '*.resources' -print0 | xargs -0 -I {} cp -a {} "${PWD}/staging/tmp/AppDir/usr/bin/" -LDAI_OUTPUT="staging/tmp/xtool.AppImage" ./staging/linuxdeploy/linuxdeploy.AppImage \+env \+LDAI_OUTPUT="staging/tmp/xtool.AppImage" \+LDAI_UPDATE_INFORMATION="gh-releases-zsync|xtool-org|xtool|latest|xtool-${curr_arch}.AppImage.zsync" \+ ./staging/linuxdeploy/linuxdeploy.AppImage \ --appdir staging/tmp/AppDir \ --output appimage \ -e "${bin}/xtool" \ -d xtool.desktop \ -i xtool.png mkdir -p packages-mv -f staging/tmp/xtool.AppImage packages/xtool.AppImage+mv -f staging/tmp/xtool.AppImage "packages/xtool-${curr_arch}.AppImage"+mv -f ./xtool.AppImage.zsync "packages/xtool-${curr_arch}.AppImage.zsync" rm -rf staging/tmp