From 289fcb00e2c60b4affd0c22a784aa88d49e2b490 Mon Sep 17 00:00:00 2001 From: Jon Saad-Falcon <41205309+jonsaadfalcon@users.noreply.github.com> Date: Tue, 19 May 2026 12:22:24 -0700 Subject: [PATCH] =?UTF-8?q?fix(ci):=20desktop=20=E2=80=94=20translate=20PE?= =?UTF-8?q?P=20440=20.devN=20to=20SemVer=20for=20Tauri=20(#360)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tauri's build script enforces strict SemVer (`MAJOR.MINOR.PATCH[-pre][+build]`) on `tauri.conf.json > version`, but the autotag scheme introduced in #358 emits PEP 440 dev releases like `1.0.2.dev661` — PEP 440 separates dev with `.`, SemVer requires `-`. First post-#358 desktop run failed with: tauri.conf.json > version must be a semver string PyPI requires PEP 440; Tauri requires SemVer. They genuinely don't agree on `.devN`. Translate just for the Tauri bundle: 1.0.2.dev661 -> 1.0.2-dev.661 (valid SemVer prerelease) 1.0.2 -> 1.0.2 (passthrough) 1.0.0-rc.1 -> 1.0.0-rc.1 (passthrough) Tag, git history, PyPI wheel, and the updater's `latest.json` all keep the PEP 440 form. Only the embedded bundle version uses SemVer, and the comparison the updater does is bundle-vs-latest.json (both SemVer now) so the upgrade path stays consistent. Failing run for reference: 26118619500 Co-authored-by: krypticmouse --- .github/workflows/desktop.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 4d8139d8..d07355ed 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -188,6 +188,12 @@ jobs: echo "prerelease=true" >> "$GITHUB_OUTPUT" fi echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + # Tauri's build script requires strict SemVer (MAJOR.MINOR.PATCH[-pre][+build]). + # PEP 440 dev releases (`1.0.2.dev661`) are NOT valid SemVer, so we + # translate `.devN` to the SemVer-equivalent `-dev.N` prerelease form. + # PyPI keeps the PEP 440 form; only the Tauri bundle uses SemVer. + TAURI_VERSION="${VERSION/.dev/-dev.}" + echo "tauri_version=${TAURI_VERSION}" >> "$GITHUB_OUTPUT" - name: Configure Apple signing if: runner.os == 'macOS' @@ -223,7 +229,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} - TAURI_CONFIG: '{"version":"${{ steps.release-info.outputs.version }}","bundle":{"externalBin":["binaries/ollama"]}}' + TAURI_CONFIG: '{"version":"${{ steps.release-info.outputs.tauri_version }}","bundle":{"externalBin":["binaries/ollama"]}}' with: projectPath: frontend tauriScript: npx tauri