Skip to content

Commit

Permalink
🚨 Suppress deprecated warning
Browse files Browse the repository at this point in the history
  • Loading branch information
proudust committed Dec 16, 2023
1 parent b767a21 commit 3b7aab6
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 17 deletions.
21 changes: 5 additions & 16 deletions _compile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { join } from "https://deno.land/std@0.171.0/path/mod.ts";
import $ from "https://deno.land/x/dax@0.35.0/mod.ts";
import { build as esbuild } from "https://deno.land/x/esbuild@v0.15.16/mod.js";
import { ghDescribe } from "./core/mod.ts";

Expand Down Expand Up @@ -26,22 +26,11 @@ for (
]
) {
console.log(`$ deno compile --target ${target}`);
const cmd = [
"deno",
"compile",
"-q",
"--allow-run",
"-o",
join("dist", `gh-describe-${target}`),
"--target",
target,
"./dist/cli_deno.js",
];
const process = Deno.run({ cmd });
const { code } = await process.status();
const output = `dist/gh-describe-${target}`;
const cmd = $`deno compile -q --allow-run -o ${output} --target ${target} ./dist/cli_deno.js`;
const { code } = await cmd;
if (code !== 0) {
const command = cmd.map((x) => x.includes(" ") ? `"${x}"` : x).join(" ");
throw new Error(`\`${command}\` exit code is not zero, ExitCode: ${code}`);
throw new Error(`\`deno compile\` exit code is not zero, ExitCode: ${code}`);
}
}

Expand Down
99 changes: 98 additions & 1 deletion deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions gh-wrapper/exec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export async function exec(args: string[]): Promise<string> {
// deno-lint-ignore no-deprecated-deno-api
const process = Deno.run({
cmd: ["gh", ...args],
stdout: "piped",
Expand Down
1 change: 1 addition & 0 deletions git-wrapper/exec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export async function exec(args: string[]): Promise<string> {
// deno-lint-ignore no-deprecated-deno-api
const process = Deno.run({
cmd: ["git", ...args],
stdout: "piped",
Expand Down

0 comments on commit 3b7aab6

Please sign in to comment.