s3si.ts/gui/scripts/enable-updater.ts

11 lines
478 B
TypeScript
Raw Normal View History

2023-04-21 10:09:00 -04:00
import * as path from "https://deno.land/std@0.178.0/path/mod.ts";
if (import.meta.main) {
const __dirname = path.dirname(path.fromFileUrl(import.meta.url));
const tauriConf = path.join(__dirname, '../src-tauri/tauri.conf.json');
const tauriConfContent = await Deno.readTextFile(tauriConf);
const tauriConfJson = JSON.parse(tauriConfContent);
tauriConfJson.tauri.updater.active = true;
await Deno.writeTextFile(tauriConf, JSON.stringify(tauriConfJson, null, 2));
}