Electron forge migration (#2)

Reviewed-on: https://git.internal.vyntehome.com/vynte/vynte-connect/pulls/2
This commit was merged in pull request #2.
This commit is contained in:
2026-05-31 19:28:32 -05:00
parent 980535d682
commit 30bedb9b25
48 changed files with 11388 additions and 4356 deletions
+4 -7
View File
@@ -2,24 +2,24 @@ import { createWriteStream, existsSync, mkdirSync, rmSync } from "node:fs";
import { basename, join } from "node:path";
import { pipeline } from "node:stream/promises";
import { spawnSync } from "node:child_process";
import { tmpdir } from "node:os";
const root = join(import.meta.dirname, "..");
const versionInput = process.env.NETBIRD_VERSION || "latest";
const release = await getRelease(versionInput);
const version = release.tag_name.replace(/^v/, "");
const tmpDir = join(root, ".tmp-netbird-assets");
const tmpDir = tmpdir();
const targets = [
{
label: "macOS arm64",
assetName: `netbird_${version}_darwin_arm64.tar.gz`,
outputDir: join(root, "apps", "vynte-connect", "Resources"),
outputDir: join(import.meta.dirname, "resources"),
files: [{ source: "netbird", destination: "netbird" }]
},
{
label: "Windows amd64",
assetName: `netbird_${version}_windows_amd64_signed.tar.gz`,
outputDir: join(root, "apps", "vynte-connect-windows", "resources"),
outputDir: join(import.meta.dirname, "resources"),
files: [
{ source: "netbird.exe", destination: "netbird.exe" },
{ source: "wintun.dll", destination: "wintun.dll" }
@@ -27,9 +27,6 @@ const targets = [
}
];
rmSync(tmpDir, { recursive: true, force: true });
mkdirSync(tmpDir, { recursive: true });
for (const target of targets) {
const asset = release.assets.find((candidate) => candidate.name === target.assetName);
if (!asset) {