feat: upgrade to rc from abra
This commit is contained in:
parent
713308e0b8
commit
c25b2b17df
|
@ -8,12 +8,24 @@ import (
|
|||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
var RC bool
|
||||
var RCFlag = &cli.BoolFlag{
|
||||
Name: "rc",
|
||||
Value: false,
|
||||
Destination: &RC,
|
||||
Usage: "Insatll the latest Release Candidate",
|
||||
}
|
||||
|
||||
// UpgradeCommand upgrades abra in-place.
|
||||
var UpgradeCommand = &cli.Command{
|
||||
Name: "upgrade",
|
||||
Usage: "Upgrade abra",
|
||||
Flags: []cli.Flag{RCFlag},
|
||||
Action: func(c *cli.Context) error {
|
||||
cmd := exec.Command("bash", "-c", "curl -s https://install.abra.coopcloud.tech | bash")
|
||||
if RC {
|
||||
cmd = exec.Command("bash", "-c", "curl -s https://git.coopcloud.tech/coop-cloud/abra/raw/branch/main/scripts/installer/installer | bash -s -- --rc")
|
||||
}
|
||||
logrus.Debugf("attempting to run '%s'", cmd)
|
||||
if err := internal.RunCmd(cmd); err != nil {
|
||||
logrus.Fatal(err)
|
||||
|
|
Loading…
Reference in New Issue