mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-27 04:16:25 -08:00
ci(tauri): build desktop apps and native packages on release
This commit is contained in:
1 parent
61ddf4ed4c
commit
825af1aa8e
2 files changed
+256
No files matched your search
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env node
|
||||
/* oxlint-disable no-console */
|
||||
|
||||
// Stamps a version into src-tauri/tauri.conf.json, which can drift from the
|
||||
// package.json version Knope tags on. Used by tauri-build.yml.
|
||||
|
||||
import { readFileSync, writeFileSync } from 'node:fs';
|
||||
import process from 'node:process';
|
||||
|
||||
const version = process.argv[2];
|
||||
if (!version || !/^\d+\.\d+\.\d+/.test(version)) {
|
||||
console.error(`Usage: set-tauri-version.mjs <version> (got: ${version ?? '<none>'})`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const file = 'src-tauri/tauri.conf.json';
|
||||
const config = JSON.parse(readFileSync(file, 'utf8'));
|
||||
config.version = version;
|
||||
writeFileSync(file, `${JSON.stringify(config, null, 2)}\n`);
|
||||
console.log(`Set ${file} version to ${version}`);
|
||||
Reference in new issue
Block a user