0
0
forked from toolshed/abra

fix: get branch is now more robust

This commit is contained in:
2021-12-24 00:43:24 +01:00
parent a85cfe40d0
commit 9b8ff1ddcd
4 changed files with 50 additions and 19 deletions

View File

@ -9,6 +9,7 @@ import (
"coopcloud.tech/abra/pkg/client"
"coopcloud.tech/abra/pkg/config"
"coopcloud.tech/abra/pkg/dns"
"coopcloud.tech/abra/pkg/git"
"coopcloud.tech/abra/pkg/recipe"
"coopcloud.tech/abra/pkg/upstream/stack"
"github.com/AlecAivazis/survey/v2"
@ -58,7 +59,11 @@ func DeployAction(c *cli.Context) error {
logrus.Fatal(err)
}
} else {
version = "latest commit"
head, err := git.GetRecipeHead(app.Type)
if err != nil {
logrus.Fatal(err)
}
version = head.String()[:8]
logrus.Warn("no versions detected, using latest commit")
if err := recipe.EnsureLatest(app.Type); err != nil {
logrus.Fatal(err)