mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-17 23:13:51 +01:00
Actually write the file
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const tauriConfig = fs.readFileSync(path.join(__dirname, '../src-tauri/tauri.conf.json'), 'utf8');
|
||||
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')
|
||||
}
|
||||
|
||||
console.log(tauriConfig.replaceAll('__YAAK_VERSION__', process.env.YAAK_VERSION.replace('v', '')));
|
||||
const newTauriConfig = tauriConfig.replaceAll('__YAAK_VERSION__', process.env.YAAK_VERSION.replace('v', ''));
|
||||
fs.writeFileSync(configPath, newTauriConfig);
|
||||
|
||||
Reference in New Issue
Block a user