From 4deae63d43ab86fac1e9abd0da1a2032fd6808b9 Mon Sep 17 00:00:00 2001 From: Micha Date: Sun, 7 Dec 2025 17:50:58 +0100 Subject: [PATCH] Sparkle fixes --- README.md | 1 + Sparkle/appcast.xml | 10 +--------- scripts/build_release.sh | 5 +++++ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ee570ce..f194ed4 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ GITEA_REPO="iKeyMon" # 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}}" +# If you prefer SPARKLE_DOWNLOAD_BASE_URL, it will automatically append `/v` for you. # SPARKLE_APPCAST_OUTPUT="$ROOT_DIR/Sparkle/appcast.xml" # default ``` diff --git a/Sparkle/appcast.xml b/Sparkle/appcast.xml index 2b6da0e..f683ea6 100644 --- a/Sparkle/appcast.xml +++ b/Sparkle/appcast.xml @@ -2,14 +2,6 @@ iKeyMon - - 26.0.30 - Sun, 07 Dec 2025 17:48:37 +0100 - 63 - 26.0.30 - 15.2 - - 26.0.29 Sun, 07 Dec 2025 17:07:32 +0100 @@ -27,4 +19,4 @@ - \ No newline at end of file + diff --git a/scripts/build_release.sh b/scripts/build_release.sh index 2c373e9..fca1a09 100755 --- a/scripts/build_release.sh +++ b/scripts/build_release.sh @@ -36,6 +36,11 @@ generate_appcast() { download_prefix="${SPARKLE_DOWNLOAD_BASE_URL%/}/v${VERSION}" fi + # Ensure the version segment is present to match Gitea's /download/vX.Y.Z/ layout. + if [[ -n "$download_prefix" ]] && [[ "$download_prefix" != *"/$VERSION"* ]]; then + download_prefix="${download_prefix%/}/v${VERSION}" + fi + if [[ -z "$generator" || -z "${SPARKLE_EDDSA_KEY_FILE:-}" || -z "$download_prefix" ]]; then echo "ℹ️ Skipping Sparkle appcast generation (generator/key/download prefix not configured)." return