fix: set "chaos" if a specified* version is "chaos-y"
*either from env file or command-line
This commit is contained in:
@ -106,13 +106,15 @@ checkout as-is. Recipe commit hashes are also supported as values for
|
||||
log.Fatal(i18n.G("get deploy version: %s", err))
|
||||
}
|
||||
|
||||
versionIsChaos := false
|
||||
if !internal.Chaos {
|
||||
isChaos, err := app.Recipe.EnsureVersion(toDeployVersion)
|
||||
var err error
|
||||
versionIsChaos, err = app.Recipe.EnsureVersion(toDeployVersion)
|
||||
if err != nil {
|
||||
log.Fatal(i18n.G("ensure recipe: %s", err))
|
||||
}
|
||||
if isChaos {
|
||||
log.Fatal(i18n.G("version '%s' appears to be a chaos commit, but --chaos/-C was not provided", toDeployVersion))
|
||||
if versionIsChaos {
|
||||
log.Warnf(i18n.G("version '%s' appears to be a chaos commit, but --chaos/-C was not provided", toDeployVersion))
|
||||
}
|
||||
}
|
||||
|
||||
@ -152,7 +154,7 @@ checkout as-is. Recipe commit hashes are also supported as values for
|
||||
|
||||
appPkg.ExposeAllEnv(stackName, compose, app.Env)
|
||||
appPkg.SetRecipeLabel(compose, stackName, app.Recipe.Name)
|
||||
appPkg.SetChaosLabel(compose, stackName, internal.Chaos)
|
||||
appPkg.SetChaosLabel(compose, stackName, internal.Chaos || versionIsChaos)
|
||||
if internal.Chaos {
|
||||
appPkg.SetChaosVersionLabel(compose, stackName, toDeployVersion)
|
||||
}
|
||||
|
Reference in New Issue
Block a user