From a30c6a0b275079b8f5f3ff71afb0ea898bffc733 Mon Sep 17 00:00:00 2001 From: Tristan Isham Date: Sun, 11 Feb 2024 12:58:29 -0500 Subject: [PATCH] Updated and tested build.ts --- .gitignore | 14 +++++++------- build.ts | 12 +++++++----- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 6aff5ec..83d25c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ -/zig-cache -/zig-out -/build -/dist -/demo +zig-cache/ +zig-out/ +build/ +dist/ +demo/ zvm -testdata -.env \ No newline at end of file +testdata/ +.env* \ No newline at end of file diff --git a/build.ts b/build.ts index 904280f..36ca615 100755 --- a/build.ts +++ b/build.ts @@ -61,19 +61,21 @@ for (const os of GOOS) { } const zvm_str = `zvm-${os}-${ar}`; - if (os == "windows") { - console.time(`Compress zvm: ${zvm_str}`); + if (os === "windows") { + console.time(`Compress zvm (zip): ${zvm_str}`); const zip = new Deno.Command(`zip`, { args: [`${zvm_str}.zip`, `${zvm_str}/zvm.exe`], stdin: "piped", stdout: "piped", }); + zip.spawn(); - console.timeEnd(`Compress zvm: ${zvm_str}`); + + console.timeEnd(`Compress zvm (zip): ${zvm_str}`); continue; } const tar = new Tar(); - console.time(`Compress zvm: ${zvm_str}`); + console.time(`Compress zvm (tar): ${zvm_str}`); await tar.append("zvm", { filePath: `${zvm_str}/zvm`, }); @@ -83,7 +85,7 @@ for (const os of GOOS) { }); await copy(tar.getReader(), writer); writer.close(); - console.timeEnd(`Compress zvm: ${zvm_str}`); + console.timeEnd(`Compress zvm (tar): ${zvm_str}`); } }