Add NerdFont for symbols and version bump script

Add version bump script to synchronize GUI and daemon versions
This commit is contained in:
2026-06-15 16:32:31 +07:00
parent 0a67f401c4
commit 0275c64ace
2 changed files with 26 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env node
// Bump the patch version in lockstep for the GUI (app/src-tauri/tauri.conf.json)
// and the daemon/CLI (root Cargo.toml [workspace.package].version), so the app's
// update check and the daemon's reported version never drift apart.
import { readFileSync, writeFileSync } from "node:fs";
const TAURI_CONF = "app/src-tauri/tauri.conf.json";
const CARGO_TOML = "Cargo.toml";
const conf = JSON.parse(readFileSync(TAURI_CONF, "utf8"));
const parts = conf.version.split(".").map((n) => parseInt(n, 10) || 0);
parts[2] = (parts[2] || 0) + 1;
const next = parts.join(".");
conf.version = next;
writeFileSync(TAURI_CONF, JSON.stringify(conf, null, 2) + "\n");
let cargo = readFileSync(CARGO_TOML, "utf8");
// Replace only the version inside [workspace.package], not dependency versions.
cargo = cargo.replace(
/(\[workspace\.package\][\s\S]*?version\s*=\s*")[^"]+(")/,
`$1${next}$2`
);
writeFileSync(CARGO_TOML, cargo);
console.log(`version → ${next} (GUI + daemon)`);