fix: latest commit for new recipe version

See toolshed/abra#527
This commit is contained in:
2025-04-14 11:36:50 +02:00
parent 2b9a185aff
commit 742a726778
2 changed files with 31 additions and 0 deletions

View File

@ -109,6 +109,13 @@ var AppNewCommand = &cobra.Command{
if err := recipe.EnsureLatest(); err != nil {
log.Fatal(err)
}
head, err := recipe.Head()
if err != nil {
log.Fatalf("failed to retrieve latest commit for %s: %s", recipe.Name, err)
}
recipeVersion = formatter.SmallSHA(head.String())
}
}