Hide secondary windows until the login UI is painted, open external links in the default browser, and add signed Githop auto-updates
Hop-State: A_06FPJAAEMY0VXGY9S90PE90 Hop-Proposal: R_06FPJA9RY0ZAWJ1K0K760W8 Hop-Task: T_06FPJ5688NFG8VWKSFCTZEG Hop-Attempt: AT_06FPJ5688M08V2K0PEFVQX0
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { readFile, writeFile } from "node:fs/promises";
|
||||
import process from "node:process";
|
||||
|
||||
const repository = "https://githop.xyz/GnosysLabs/Synapsis-Desktop";
|
||||
const bundleDirectory = new URL("../src-tauri/target/release/bundle/macos/", import.meta.url);
|
||||
const config = JSON.parse(
|
||||
await readFile(new URL("../src-tauri/tauri.conf.json", import.meta.url), "utf8"),
|
||||
);
|
||||
const version = config.version;
|
||||
const tag = process.env.SYNAPSIS_RELEASE_TAG || `v${version}`;
|
||||
const notes = process.env.SYNAPSIS_RELEASE_NOTES || `Synapsis ${version}`;
|
||||
const archiveName = "Synapsis.app.tar.gz";
|
||||
const signature = (
|
||||
await readFile(new URL(`${archiveName}.sig`, bundleDirectory), "utf8")
|
||||
).trim();
|
||||
const architecture = process.arch === "arm64" ? "aarch64" : "x86_64";
|
||||
const manifest = {
|
||||
version,
|
||||
notes,
|
||||
pub_date: new Date().toISOString(),
|
||||
platforms: {
|
||||
[`darwin-${architecture}`]: {
|
||||
signature,
|
||||
url: `${repository}/releases/download/${encodeURIComponent(tag)}/${archiveName}`,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const destination = new URL("latest.json", bundleDirectory);
|
||||
await writeFile(destination, `${JSON.stringify(manifest, null, 2)}\n`);
|
||||
console.log(`Created updater manifest for Synapsis ${version}.`);
|
||||
Reference in New Issue
Block a user