Improve upgrade script
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3cda4ee8c8
commit
a0fef1ef76
@ -25,27 +25,39 @@ export default async function upgrade() {
|
||||
});
|
||||
|
||||
if (res) {
|
||||
const cmd = [
|
||||
"deno",
|
||||
"install",
|
||||
"-A",
|
||||
"--unstable",
|
||||
"-f",
|
||||
const cmd_base = ["deno", "install", "-A", "--unstable", "-f"];
|
||||
|
||||
const cmd1 = [
|
||||
...cmd_base,
|
||||
`https://deno.hibas123.de/raw/@denreg-cli@${meta.version}/denreg.ts`,
|
||||
];
|
||||
|
||||
const cmd2 = [
|
||||
...cmd_base,
|
||||
`https://deno.hibas123.de/raw/@denreg-cli@${meta.version}/dpm.ts`,
|
||||
];
|
||||
|
||||
await requestPermOrExit(
|
||||
"run",
|
||||
"Run permission required to install new version. Or run it manually: " +
|
||||
cmd.join(" ")
|
||||
cmd1.join(" ")
|
||||
);
|
||||
|
||||
const process = Deno.run({
|
||||
cmd,
|
||||
const process1 = Deno.run({
|
||||
cmd: cmd1,
|
||||
});
|
||||
|
||||
const s = await process.status();
|
||||
if (!s) {
|
||||
const s1 = await process1.status();
|
||||
if (!s1) {
|
||||
console.log(Colors.red("Upgrade failed!"));
|
||||
}
|
||||
|
||||
const process2 = Deno.run({
|
||||
cmd: cmd2,
|
||||
});
|
||||
|
||||
const s2 = await process2.status();
|
||||
if (!s2) {
|
||||
console.log(Colors.red("Upgrade failed!"));
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@denreg-cli",
|
||||
"version": "0.3.2",
|
||||
"version": "0.3.3",
|
||||
"description": "CLI for the DenReg package registry",
|
||||
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
||||
"contributors": [],
|
||||
|
@ -1 +1 @@
|
||||
export const version = "0.3.2"
|
||||
export const version = "0.3.3"
|
Loading…
Reference in New Issue
Block a user