add Sparkle appcast
This commit is contained in:
25
README.md
25
README.md
@@ -8,10 +8,10 @@ iKeyMon is a native macOS app written in SwiftUI that provides live monitoring f
|
||||
- Shows CPU load, memory usage, swap usage, and disk usage
|
||||
- Periodic ping via `/api/ping` endpoint to check if a server is reachable
|
||||
- Colored status indicator for each server in the list
|
||||
- Automatic updates:
|
||||
- Automatic refreshes:
|
||||
- Ping every 10 seconds
|
||||
- Server info every 60 seconds
|
||||
- Optional automatic update checks that watch the latest Gitea release (with manual “Check now” button and prerelease channel toggle)
|
||||
- Built-in Sparkle updater (automatic checks, downloads, and relaunch once a signed release is available)
|
||||
- Organized layout using tabs: General / Resources / Services
|
||||
- Stores API keys securely in the macOS Keychain
|
||||
- Native macOS look & feel using SwiftUI
|
||||
@@ -57,16 +57,27 @@ GITEA_REPO="iKeyMon"
|
||||
# optional: GITEA_API_BASE="https://git.24unix.net/api/v1"
|
||||
# optional: GITEA_TARGET_COMMIT="master"
|
||||
# optional: GITEA_PRERELEASE="false" # defaults to true until preferences are done
|
||||
# optional Sparkle feed helpers:
|
||||
# SPARKLE_EDDSA_KEY_FILE="$HOME/.config/Sparkle/iKeyMon.key"
|
||||
# SPARKLE_DOWNLOAD_BASE_TEMPLATE="https://git.24unix.net/tracer/iKeyMon/releases/download/v{{VERSION}}"
|
||||
# SPARKLE_APPCAST_OUTPUT="$ROOT_DIR/Sparkle/appcast.xml" # default
|
||||
```
|
||||
|
||||
`GITEA_TARGET_COMMIT` defaults to the current `HEAD` commit, so overriding it lets you publish from another branch if needed. Whenever those variables are set, the script will create (or reuse) tag `v<version>` and upload both ZIP and DMG as release assets automatically.
|
||||
|
||||
### Update checks
|
||||
### Sparkle updates
|
||||
|
||||
- The app can automatically query the Gitea release feed on launch (Preferences → Updates → “Automatically check for updates”).
|
||||
- “Check for updates” also lives in the main window toolbar; if you're already up to date, you'll get a confirmation alert.
|
||||
- Preferences let you opt into prerelease builds (enabled by default for now because current releases are flagged prerelease) and show the latest fetched release number for reference.
|
||||
- When a newer build is available, a prompt offers to open the DMG download (or you can revisit the release info inside Preferences).
|
||||
iKeyMon uses [Sparkle](https://sparkle-project.org/) for macOS-safe updates.
|
||||
|
||||
1. Generate an EdDSA key pair once (`./Packages/Sparkle/bin/generate_keys`). Store the private key on-disk (for example `~/.config/Sparkle/iKeyMon.key`, which the build script expects) and copy the public key into the `SUPublicEDKey` entry (see Info.plist notes below).
|
||||
2. `./scripts/build_release.sh` signs the ZIP with Sparkle’s `sign_update` tool and invokes `generate_appcast` automatically when the Sparkle variables are present. The generated feed is written to `Sparkle/appcast.xml`, so commit that file after every release. Point `SPARKLE_DOWNLOAD_BASE_TEMPLATE` at your release download prefix to ensure the feed URLs resolve correctly.
|
||||
3. Set `SUFeedURL` in Info.plist (or the corresponding build setting) to the raw URL of `Sparkle/appcast.xml` inside this repo (e.g. `https://git.24unix.net/tracer/iKeyMon/raw/branch/master/Sparkle/appcast.xml`).
|
||||
|
||||
Preferences expose Sparkle’s built-in toggles for “Automatically check” and “Automatically download”, and the toolbar button simply calls Sparkle’s “Check for Updates…” sheet.
|
||||
|
||||
> `./scripts/build_release.sh` will call `generate_appcast` for you when `SPARKLE_EDDSA_KEY_FILE` and either `SPARKLE_DOWNLOAD_BASE_TEMPLATE` (with `{{VERSION}}` placeholder) or `SPARKLE_DOWNLOAD_BASE_URL` are set. It tries to locate Sparkle’s CLI in DerivedData automatically, but you can override the path via `SPARKLE_GENERATE_APPCAST`. The resulting feed is written to `SPARKLE_APPCAST_OUTPUT` (defaults to `Sparkle/appcast.xml`).
|
||||
|
||||
> Build settings include `INFOPLIST_KEY_SUFeedURL` and `INFOPLIST_KEY_SUPublicEDKey`. Make sure to fill both before shipping a build so Sparkle knows where to fetch updates and how to verify them.
|
||||
|
||||
### Versioning workflow
|
||||
|
||||
|
||||
Reference in New Issue
Block a user