fix: ensure we have version checked out on deploy

This commit is contained in:
2021-10-18 09:30:43 +02:00
parent 62cc7ef92d
commit 9526d1fde6
2 changed files with 14 additions and 0 deletions

View File

@ -109,6 +109,15 @@ func EnsureExists(recipe string) error {
func EnsureVersion(recipeName, version string) error {
recipeDir := path.Join(config.ABRA_DIR, "apps", recipeName)
isClean, err := gitPkg.IsClean(recipeName)
if err != nil {
return err
}
if !isClean {
return fmt.Errorf("'%s' has locally unstaged changes", recipeName)
}
repo, err := git.PlainOpen(recipeDir)
if err != nil {
return err