mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-20 15:51:23 +02:00
Actually write the file
This commit is contained in:
@@ -1,9 +1,12 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs');
|
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) {
|
if (!process.env.YAAK_VERSION) {
|
||||||
throw new Error('YAAK_VERSION environment variable not set')
|
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