Skip to content

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.

TypeScript

fix(release): bump desktop version to 0.8.4 so artifacts match the tag (#948) (#961)

tashdroidc214fcf0bb8a
diff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.yml
index b832e809..58cc58aa 100644
--- a/.github/workflows/desktop-release.yml
+++ b/.github/workflows/desktop-release.yml
@@ -9,6 +9,10 @@ name: Desktop release
# - push tags 'v*' build + attach the installers to the release
# - pull_request (desktop) build-only smoke test so the Windows build can't
# silently rot (only when desktop/CI files change)
+#
+# Tagged runs check desktop/package.json against the tag before building — see
+# #948, where v0.8.2 through v0.8.4 shipped installers stamped 0.8.1 because
+# nobody bumped that file.
on:
workflow_dispatch:
@@ -63,11 +67,35 @@ jobs:
with:
node-version: '20'
+ # #948: v0.8.2–v0.8.4 shipped installers stamped 0.8.1 because
+ # desktop/package.json was never bumped after v0.8.1. electron-builder
+ # reads that field for the artifact filenames AND the latest*.yml updater
+ # manifests, so a stale number silently mislabels the whole release and
+ # breaks auto-update. Fail the tagged run here — before the install,
+ # build and package steps — instead of publishing mislabeled artifacts.
+ # Untagged runs (workflow_dispatch, pull_request) have no tag to compare
+ # against and are skipped.
+ - name: Verify desktop version matches the tag
+ if: startsWith(github.ref, 'refs/tags/')
+ shell: bash
+ run: |
+ set -euo pipefail
+ VERSION=$(node -p "require('./desktop/package.json').version")
+ if [ "v$VERSION" != "$GITHUB_REF_NAME" ]; then
+ echo "::error file=desktop/package.json::desktop/package.json is $VERSION, so electron-builder would stamp the artifacts v$VERSION, but the tag is $GITHUB_REF_NAME. Set desktop/package.json and desktop/package-lock.json to ${GITHUB_REF_NAME#v}, then move the tag."
+ exit 1
+ fi
+ echo "desktop/package.json $VERSION matches tag $GITHUB_REF_NAME."
+
- name: Install workspace dependencies
run: npm install
+ # `npm ci` rather than `install`: install rewrites desktop/package-lock.json
+ # in place, which would quietly repair a stale lockfile version before the
+ # lockfile-sync assertion in src/__tests__/version.test.ts ever sees it.
+ # ci installs the lockfile as committed, so that test is a real guard here.
- name: Install desktop dependencies
- run: npm --prefix desktop install
+ run: npm --prefix desktop ci
# The per-platform window chrome (#703's menu-bar fix) lives in a branch
# that never executes on a developer's mac. These run on both matrix
diff --git a/desktop/package-lock.json b/desktop/package-lock.json
index aa1688cd..73c323aa 100644
--- a/desktop/package-lock.json
+++ b/desktop/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "freellmapi-desktop",
- "version": "0.6.9",
+ "version": "0.8.5",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "freellmapi-desktop",
- "version": "0.6.9",
+ "version": "0.8.5",
"dependencies": {
"better-sqlite3": "^12.10.0"
},
diff --git a/desktop/package.json b/desktop/package.json
index 38e39504..68d91224 100644
--- a/desktop/package.json
+++ b/desktop/package.json
@@ -1,6 +1,6 @@
{
"name": "freellmapi-desktop",
- "version": "0.8.1",
+ "version": "0.8.5",
"description": "FreeLLMAPI menu-bar app — local OpenAI-compatible LLM router",
"author": {
"name": "tashfeenahmed",
diff --git a/desktop/src/__tests__/version.test.ts b/desktop/src/__tests__/version.test.ts
new file mode 100644
index 00000000..41a17b08
--- /dev/null
+++ b/desktop/src/__tests__/version.test.ts
@@ -0,0 +1,41 @@
+import { readFileSync } from 'node:fs';
+import { dirname, resolve } from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { describe, it, expect } from 'vitest';
+
+// #948: the v0.8.2–v0.8.4 releases shipped installers stamped 0.8.1 because
+// desktop/package.json was never bumped after v0.8.1. electron-builder reads
+// this version for the artifact filenames and the latest*.yml updater
+// manifests, so a stale number here silently mislabels every future release.
+//
+// The authoritative tag-vs-version check is the "Verify desktop version
+// matches the tag" step in .github/workflows/desktop-release.yml — only a
+// tagged run knows which version is being released, so it cannot live here.
+// These tests cover what is checkable without a tag: that the version is
+// well-formed, and that the lockfile tracks it (a lockfile left behind is how
+// the 0.6.9 stamp survived three releases). The lockfile assertion is only
+// meaningful because the workflow installs with `npm ci`; `npm install` would
+// rewrite package-lock.json before this file ever runs.
+
+const here = dirname(fileURLToPath(import.meta.url));
+const pkg = JSON.parse(readFileSync(resolve(here, '../../package.json'), 'utf8')) as {
+ name: string;
+ version: string;
+};
+const lock = JSON.parse(readFileSync(resolve(here, '../../package-lock.json'), 'utf8')) as {
+ name: string;
+ version: string;
+ packages: Record<string, { version?: string }>;
+};
+
+describe('desktop package version', () => {
+ it('is a semver-ish x.y.z', () => {
+ expect(pkg.version).toMatch(/^\d+\.\d+\.\d+$/);
+ });
+
+ it('is stamped into the lockfile root', () => {
+ expect(lock.name).toBe(pkg.name);
+ expect(lock.version).toBe(pkg.version);
+ expect(lock.packages['']?.version).toBe(pkg.version);
+ });
+});