Skip to content

Commit

Permalink
Updated deprecated Deno.run() API to Deno.Command() API
Browse files Browse the repository at this point in the history
  • Loading branch information
nithinkjoy-tech committed Feb 6, 2024
1 parent a9d6880 commit 67f1481
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ for (const os of GOOS) {
Deno.env.set("GOARCH", ar);
const zvm_str = `zvm-${os}-${ar}`;
console.time(`Build zvm: ${zvm_str}`);
// deno-lint-ignore no-deprecated-deno-api
const build_cmd = Deno.run({
cmd: [
"go",

const build_cmd = new Deno.Command("go", {
args: [
"build",
"-o",
`build/${zvm_str}/zvm${(os == "windows" ? ".exe" : "")}`,
"-ldflags=-w -s", "-trimpath",
`build/${zvm_str}/zvm${os === "windows" ? ".exe" : ""}`,
"-ldflags=-w -s",
"-trimpath",
],
});

const { code } = await build_cmd.status();
const { code } = await build_cmd.output();
if (code !== 0) {
console.error("Something went wrong");
Deno.exit(1);
Expand Down

0 comments on commit 67f1481

Please sign in to comment.