From 5b18ce804f6743d8537f3386d14950cfff0a4b00 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Tue, 11 Aug 2026 10:06:00 -0700 Subject: [PATCH] Start the 0.4 line, and give previews the version they are previewing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two version problems, one of them mine. **Previews claimed x.y.0.** The preview workflow hard-coded the patch number, so every preview installer reported 0.3.0 whatever it contained, while the real build computes the patch from tags. It now runs the same computation, so a preview is labelled with the version the release it previews would carry. **A new minor line started at the wrong number.** `compute-version`'s fallback for "no tag matches this line yet" counted every commit in the repository — fine as a bootstrap, wrong the moment a minor version is bumped: the first 0.4 build would have been 0.4.234. A line nobody has tagged is a new line, and a new line starts at .0. With those fixed, VERSION moves to 0.4 — tab reordering, the browser pop-out, opening pages in the container's browser and the Playwright install fix are more than a patch bump. The next release is v0.4.0; today's HEAD would have been 0.3.90 on the old line. `app/package.json`, `package-lock.json`, `tauri.conf.json` and `Cargo.toml` follow to 0.4.0. CI patches all four per build, so they are the dev-time defaults rather than the source of truth — but a local `tauri dev` shows them, so they should not still say 0.3. Co-Authored-By: Claude Opus 5 (1M context) --- .gitea/workflows/build-app-preview.yml | 16 +++++++++++++++- .gitea/workflows/build-app.yml | 8 ++++++-- VERSION | 2 +- app/package-lock.json | 4 ++-- app/package.json | 2 +- app/src-tauri/Cargo.lock | 2 +- app/src-tauri/Cargo.toml | 2 +- app/src-tauri/tauri.conf.json | 2 +- 8 files changed, 28 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/build-app-preview.yml b/.gitea/workflows/build-app-preview.yml index 9a28500..6d6339c 100644 --- a/.gitea/workflows/build-app-preview.yml +++ b/.gitea/workflows/build-app-preview.yml @@ -54,7 +54,21 @@ jobs: run: | MAJOR_MINOR=$(cat VERSION | tr -d '[:space:]') SHORT_SHA=$(git rev-parse --short HEAD) - VERSION="${MAJOR_MINOR}.0-preview.${SHORT_SHA}" + + # The patch number is computed exactly as build-app.yml does it, so a + # preview is labelled with the version the release it previews would + # carry. This used to be hard-coded `.0`, which made every preview + # installer claim to be x.y.0 no matter what it contained. + LATEST_TAG=$(git tag -l "v${MAJOR_MINOR}.*" --sort=-v:refname | grep -E "^v${MAJOR_MINOR}\.[0-9]+$" | head -1 || true) + if [ -n "$LATEST_TAG" ]; then + PATCH=$(git rev-list --count "${LATEST_TAG}..HEAD") + echo "Latest matching tag: ${LATEST_TAG} (+${PATCH} commits)" + else + echo "No v${MAJOR_MINOR}.* tag yet — starting this line at .0" + PATCH=0 + fi + + VERSION="${MAJOR_MINOR}.${PATCH}-preview.${SHORT_SHA}" echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT echo "Computed preview version: ${VERSION}" diff --git a/.gitea/workflows/build-app.yml b/.gitea/workflows/build-app.yml index 56ffaee..273569c 100644 --- a/.gitea/workflows/build-app.yml +++ b/.gitea/workflows/build-app.yml @@ -47,8 +47,12 @@ jobs: echo "Latest matching tag: ${LATEST_TAG}" PATCH=$(git rev-list --count "${LATEST_TAG}..HEAD") else - echo "No matching tag found for v${MAJOR_MINOR}.*, using total commit count" - PATCH=$(git rev-list --count HEAD) + # A minor line nobody has tagged yet is a *new* line, and a new line + # starts at .0 — that is what "we are moving to 0.4.x" means. The + # old fallback here counted every commit in the repository, which + # would have made the first 0.4 build 0.4.234. + echo "No v${MAJOR_MINOR}.* tag yet — starting this line at .0" + PATCH=0 fi VERSION="${MAJOR_MINOR}.${PATCH}" diff --git a/VERSION b/VERSION index 1d71ef9..e6adf3f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3 \ No newline at end of file +0.4 \ No newline at end of file diff --git a/app/package-lock.json b/app/package-lock.json index 4a3a24e..b35ded4 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,12 +1,12 @@ { "name": "triple-c", - "version": "0.3.0", + "version": "0.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "triple-c", - "version": "0.3.0", + "version": "0.4.0", "dependencies": { "@tauri-apps/api": "^2", "@tauri-apps/plugin-dialog": "^2.7.0", diff --git a/app/package.json b/app/package.json index cf64567..3c02859 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "triple-c", "private": true, - "version": "0.3.0", + "version": "0.4.0", "type": "module", "scripts": { "dev": "vite", diff --git a/app/src-tauri/Cargo.lock b/app/src-tauri/Cargo.lock index 087d3f6..7efb86a 100644 --- a/app/src-tauri/Cargo.lock +++ b/app/src-tauri/Cargo.lock @@ -5163,7 +5163,7 @@ dependencies = [ [[package]] name = "triple-c" -version = "0.3.0" +version = "0.4.0" dependencies = [ "axum", "base64 0.22.1", diff --git a/app/src-tauri/Cargo.toml b/app/src-tauri/Cargo.toml index 52cff6f..67f1ea7 100644 --- a/app/src-tauri/Cargo.toml +++ b/app/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "triple-c" -version = "0.3.0" +version = "0.4.0" edition = "2021" [lib] diff --git a/app/src-tauri/tauri.conf.json b/app/src-tauri/tauri.conf.json index e6094b3..1b98dc9 100644 --- a/app/src-tauri/tauri.conf.json +++ b/app/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-cli/schema.json", "productName": "Triple-C", - "version": "0.3.0", + "version": "0.4.0", "identifier": "com.triple-c.desktop", "build": { "beforeDevCommand": "npm run dev",