feat: Minor fixes

This commit is contained in:
2026-05-31 19:23:41 -05:00
parent 1a6fea8529
commit 4b3c791402
5 changed files with 7 additions and 10 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) {