|
| 1 | +# Releasing CodexMonitor (Linux/AppImage) |
| 2 | + |
| 3 | +This is a copy/paste friendly script-style guide. It must be run on Linux and |
| 4 | +produces an AppImage for the current machine architecture (x86_64 or |
| 5 | +arm64/aarch64). |
| 6 | + |
| 7 | +Prerequisites (examples): |
| 8 | + |
| 9 | +- Ubuntu/Debian: `sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf libfuse2` |
| 10 | +- Arch: `sudo pacman -S --needed webkit2gtk gtk3 libayatana-appindicator librsvg patchelf fuse2` |
| 11 | + |
| 12 | +Notes: |
| 13 | + |
| 14 | +- AppImage bundling uses the current OS and arch (no cross-compile in this flow). |
| 15 | +- On Arch, AppImage bundling can fail while stripping; `npm run build:appimage` |
| 16 | + already sets `NO_STRIP=1`. |
| 17 | +- If AppImage tooling fails to execute because of FUSE, try: |
| 18 | + `APPIMAGE_EXTRACT_AND_RUN=1 npm run build:appimage`. |
| 19 | + |
| 20 | +```bash |
| 21 | +set -euo pipefail |
| 22 | + |
| 23 | +# --- Set versions --- |
| 24 | +# Update these two values each release. |
| 25 | +RELEASE_VERSION="0.5.1" |
| 26 | +PREV_VERSION="0.5.0" |
| 27 | + |
| 28 | +# --- Update version fields (manual check afterwards) --- |
| 29 | +perl -pi -e "s/\"version\": \"[^\"]+\"/\"version\": \"${RELEASE_VERSION}\"/" package.json |
| 30 | +perl -pi -e "s/\"version\": \"[^\"]+\"/\"version\": \"${RELEASE_VERSION}\"/" src-tauri/tauri.conf.json |
| 31 | +npm install |
| 32 | + |
| 33 | +# --- Commit + push version bump --- |
| 34 | +git add package.json package-lock.json src-tauri/tauri.conf.json |
| 35 | +git commit -m "chore: bump version to ${RELEASE_VERSION}" |
| 36 | +git push origin main |
| 37 | + |
| 38 | +# --- Build AppImage --- |
| 39 | +npm run build:appimage |
| 40 | + |
| 41 | +# --- Collect artifact --- |
| 42 | +ARCH="$(uname -m)" |
| 43 | +APPIMAGE_DIR="src-tauri/target/release/bundle/appimage" |
| 44 | +APPIMAGE_FILE="$(ls "${APPIMAGE_DIR}"/*.AppImage | head -n 1)" |
| 45 | +mkdir -p release-artifacts |
| 46 | +cp "${APPIMAGE_FILE}" "release-artifacts/CodexMonitor_${RELEASE_VERSION}_${ARCH}.AppImage" |
| 47 | + |
| 48 | +# Optional: checksum |
| 49 | +sha256sum "release-artifacts/CodexMonitor_${RELEASE_VERSION}_${ARCH}.AppImage" \ |
| 50 | + > "release-artifacts/CodexMonitor_${RELEASE_VERSION}_${ARCH}.AppImage.sha256" |
| 51 | + |
| 52 | +# --- Changelog (for release notes) --- |
| 53 | +git log --name-only --pretty=format:"%h %s" v${PREV_VERSION}..v${RELEASE_VERSION} |
| 54 | + |
| 55 | +# --- Tag --- |
| 56 | +git tag v${RELEASE_VERSION} |
| 57 | +git push origin v${RELEASE_VERSION} |
| 58 | + |
| 59 | +# --- Create GitHub release with artifact --- |
| 60 | +gh release create v${RELEASE_VERSION} \ |
| 61 | + --title "v${RELEASE_VERSION}" \ |
| 62 | + --notes "- Short update notes" \ |
| 63 | + "release-artifacts/CodexMonitor_${RELEASE_VERSION}_${ARCH}.AppImage" \ |
| 64 | + "release-artifacts/CodexMonitor_${RELEASE_VERSION}_${ARCH}.AppImage.sha256" |
| 65 | + |
| 66 | +# --- If you need to update assets later --- |
| 67 | +gh release upload v${RELEASE_VERSION} \ |
| 68 | + "release-artifacts/CodexMonitor_${RELEASE_VERSION}_${ARCH}.AppImage" \ |
| 69 | + "release-artifacts/CodexMonitor_${RELEASE_VERSION}_${ARCH}.AppImage.sha256" \ |
| 70 | + --clobber |
| 71 | +``` |
0 commit comments