forked from toolshed/abra
fix: bail if --chaos and specific version
See coop-cloud/organising#503.
This commit is contained in:
@ -51,6 +51,11 @@ recipes.
|
||||
app := internal.ValidateApp(c)
|
||||
stackName := app.StackName()
|
||||
|
||||
specificVersion := c.Args().Get(1)
|
||||
if specificVersion != "" && internal.Chaos {
|
||||
logrus.Fatal("cannot use <version> and --chaos together")
|
||||
}
|
||||
|
||||
if err := recipe.EnsureExists(app.Recipe); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
@ -112,7 +117,6 @@ recipes.
|
||||
}
|
||||
|
||||
version := deployedVersion
|
||||
specificVersion := c.Args().Get(1)
|
||||
if specificVersion != "" {
|
||||
version = specificVersion
|
||||
logrus.Debugf("choosing %s as version to deploy", version)
|
||||
|
@ -51,6 +51,11 @@ recipes.
|
||||
app := internal.ValidateApp(c)
|
||||
stackName := app.StackName()
|
||||
|
||||
specificVersion := c.Args().Get(1)
|
||||
if specificVersion != "" && internal.Chaos {
|
||||
logrus.Fatal("cannot use <version> and --chaos together")
|
||||
}
|
||||
|
||||
if err := recipe.EnsureExists(app.Recipe); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
@ -125,7 +130,6 @@ recipes.
|
||||
logrus.Warnf("failed to determine deployed version of %s", app.Name)
|
||||
}
|
||||
|
||||
specificVersion := c.Args().Get(1)
|
||||
if specificVersion != "" {
|
||||
parsedDeployedVersion, err := tagcmp.Parse(deployedVersion)
|
||||
if err != nil {
|
||||
|
@ -56,6 +56,11 @@ recipes.
|
||||
app := internal.ValidateApp(c)
|
||||
stackName := app.StackName()
|
||||
|
||||
specificVersion := c.Args().Get(1)
|
||||
if specificVersion != "" && internal.Chaos {
|
||||
logrus.Fatal("cannot use <version> and --chaos together")
|
||||
}
|
||||
|
||||
if !internal.Chaos {
|
||||
if err := recipe.EnsureIsClean(app.Recipe); err != nil {
|
||||
logrus.Fatal(err)
|
||||
@ -126,7 +131,6 @@ recipes.
|
||||
logrus.Warnf("failed to determine deployed version of %s", app.Name)
|
||||
}
|
||||
|
||||
specificVersion := c.Args().Get(1)
|
||||
if specificVersion != "" {
|
||||
parsedDeployedVersion, err := tagcmp.Parse(deployedVersion)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user