mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-21 17:09:09 +01:00
Generic build version
This commit is contained in:
9
scripts/replace-version.cjs
Normal file
9
scripts/replace-version.cjs
Normal file
@@ -0,0 +1,9 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const tauriConfig = fs.readFileSync(path.join(__dirname, '../src-tauri/tauri.conf.json'), 'utf8');
|
||||
if (!process.env.YAAK_VERSION) {
|
||||
throw new Error('YAAK_VERSION environment variable not set')
|
||||
}
|
||||
|
||||
console.log(tauriConfig.replaceAll('__YAAK_VERSION__', process.env.YAAK_VERSION.replace('v', '')));
|
||||
Reference in New Issue
Block a user