chore(_tools): deprecate _tools scripts (#1833)

This commit is contained in:
Yoshiya Hinosawa 2022-01-19 13:18:39 +09:00 committed by GitHub
parent b79c541920
commit fa38771a17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -1,4 +1,12 @@
#!/usr/bin/env -S deno run --allow-read --allow-run
#!/usr/bin/env -S deno run --no-check --allow-read --allow-run
import * as semver from "https://deno.land/x/semver@v1.0.0/mod.ts";
if (semver.lt(Deno.version.deno, "1.18.0")) {
console.log(
"This script is deprecated. Upgrade to the latest Deno and run `deno fmt` command directly",
);
} else {
console.log("This script is deprecated. Run `deno fmt` command directly");
}
const p = Deno.run({
cmd: [Deno.execPath(), "fmt", "--config", "deno.json", ...Deno.args],
});

View File

@ -1,4 +1,12 @@
#!/usr/bin/env -S deno run --allow-read --allow-run
#!/usr/bin/env -S deno run --no-check --allow-read --allow-run
import * as semver from "https://deno.land/x/semver@v1.0.0/mod.ts";
if (semver.lt(Deno.version.deno, "1.18.0")) {
console.log(
"This script is deprecated. Upgrade to the latest Deno and run `deno lint` command directly",
);
} else {
console.log("This script is deprecated. Run `deno lint` command directly");
}
const p = Deno.run({ cmd: [Deno.execPath(), "lint", "--config", "deno.json"] });
const status = await p.status();
Deno.exit(status.code);