Improve upgrade script
continuous-integration/drone/push Build is passing Details

This commit is contained in:
User user 2021-04-28 12:20:30 +02:00
parent 3cda4ee8c8
commit a0fef1ef76
3 changed files with 25 additions and 13 deletions

View File

@ -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!"));
}
}

View File

@ -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": [],

View File

@ -1 +1 @@
export const version = "0.3.2"
export const version = "0.3.3"