Files
upstream-yaak/scripts/replace-version.cjs
upstream-mirror 906fb231cc
Some checks failed
Lint and Test / Lint/Test (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been skipped
snapshot of https://github.com/mountain-loop/yaak.git (main, 2026-09-23; blobs > 131072B omitted)
2026-09-23 17:39:41 +05:00

16 lines
547 B
JavaScript

const path = require("path");
const fs = require("fs");
const version = process.env.YAAK_VERSION?.replace("v", "");
if (!version) {
throw new Error("YAAK_VERSION environment variable not set");
}
const tauriConfigPath = path.join(__dirname, "../crates-tauri/yaak-app-client/tauri.conf.json");
const tauriConfig = JSON.parse(fs.readFileSync(tauriConfigPath, "utf8"));
tauriConfig.version = version;
console.log("Writing version " + version + " to " + tauriConfigPath);
fs.writeFileSync(tauriConfigPath, JSON.stringify(tauriConfig, null, 2));