change usage of tags to recipe versions in deploy.go

This commit is contained in:
2026-01-11 19:28:27 +01:00
parent 683a3bbf3d
commit a51a3b57f6

View File

@ -281,13 +281,21 @@ checkout as-is. Recipe commit hashes are also supported as values for
}
func getLatestVersionOrCommit(app appPkg.App) (string, error) {
versions, err := app.Recipe.Tags()
recipeVersions, warnings, err := app.Recipe.GetRecipeVersions()
if err != nil {
return "", err
}
if len(versions) > 0 && !internal.Chaos {
return versions[len(versions)-1], nil
for _, warning := range warnings {
log.Warn(warning)
}
if len(recipeVersions) > 0 && !internal.Chaos {
latest := recipeVersions[len(recipeVersions)-1]
for tag := range latest {
log.Debug(i18n.G("selected latest recipe version: %s (from %d available versions)", tag, len(recipeVersions)))
return tag, nil
}
}
head, err := app.Recipe.Head()