mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-15 13:43:39 +01:00
13 lines
443 B
JavaScript
13 lines
443 B
JavaScript
const path = require('path');
|
|
const fs = require('fs');
|
|
|
|
const configPath = path.join(__dirname, '../src-tauri/tauri.conf.json');
|
|
|
|
const tauriConfig = fs.readFileSync(configPath, 'utf8');
|
|
if (!process.env.YAAK_VERSION) {
|
|
throw new Error('YAAK_VERSION environment variable not set')
|
|
}
|
|
|
|
const newTauriConfig = tauriConfig.replaceAll('__YAAK_VERSION__', process.env.YAAK_VERSION.replace('v', ''));
|
|
fs.writeFileSync(configPath, newTauriConfig);
|