mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-22 01:19:13 +01:00
Refactor gRPC reflection!
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const tauriConfigPath = path.join(__dirname, '../src-tauri/tauri.conf.json');
|
||||
|
||||
const tauriConfig = fs.readFileSync(tauriConfigPath, 'utf8');
|
||||
const version = process.env.YAAK_VERSION?.replace('v', '');
|
||||
if (!version) {
|
||||
throw new Error('YAAK_VERSION environment variable not set')
|
||||
}
|
||||
|
||||
const tauriConfigPath = path.join(__dirname, '../src-tauri/tauri.conf.json');
|
||||
const tauriConfig = JSON.parse(fs.readFileSync(tauriConfigPath, 'utf8'));
|
||||
|
||||
tauriConfig.version = version;
|
||||
|
||||
console.log('Writing version ' + version + ' to ' + tauriConfigPath)
|
||||
const newTauriConfig = tauriConfig.replaceAll('__YAAK_VERSION__', version);
|
||||
fs.writeFileSync(tauriConfigPath, newTauriConfig);
|
||||
fs.writeFileSync(tauriConfigPath, JSON.stringify(tauriConfig, null, 2));
|
||||
|
||||
Reference in New Issue
Block a user