Add upgrade command
This commit is contained in:
@ -6,7 +6,7 @@ export default async function deprecate(options: any) {
|
||||
const meta = await getMeta();
|
||||
|
||||
const res = await Cliffy.Confirm.prompt(
|
||||
"Are you shure you want to deprecat this package?"
|
||||
"Are you sure you want to deprecat this package?"
|
||||
);
|
||||
|
||||
if (res) {
|
||||
|
26
cli/commands/upgrade.ts
Normal file
26
cli/commands/upgrade.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import { Cliffy, Colors } from "../deps.ts";
|
||||
|
||||
export default async function upgrade() {
|
||||
const res = await Cliffy.Confirm.prompt({
|
||||
message: "Are you sure you want to upgrade the denreg cli?",
|
||||
default: true,
|
||||
});
|
||||
|
||||
if (res) {
|
||||
const process = Deno.run({
|
||||
cmd: [
|
||||
"deno",
|
||||
"install",
|
||||
"-A",
|
||||
"--unstable",
|
||||
"-f",
|
||||
"https://deno.hibas123.de/raw/@denreg-cli/denreg.ts",
|
||||
],
|
||||
});
|
||||
|
||||
const s = await process.status();
|
||||
if (!s) {
|
||||
console.log(Colors.red("Upgrade failed!"));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user