diff --git a/cli/catalogue/catalogue.go b/cli/catalogue/catalogue.go index 3489710e..8e65b5a9 100644 --- a/cli/catalogue/catalogue.go +++ b/cli/catalogue/catalogue.go @@ -193,8 +193,8 @@ keys configured on your account. logrus.Infof("generated new recipe catalogue in %s", config.RECIPES_JSON) + cataloguePath := path.Join(config.ABRA_DIR, "catalogue") if internal.Publish { - cataloguePath := path.Join(config.ABRA_DIR, "catalogue") isClean, err := gitPkg.IsClean(cataloguePath) if err != nil { @@ -225,10 +225,20 @@ keys configured on your account. } } + repo, err := git.PlainOpen(cataloguePath) + if err != nil { + logrus.Fatal(err) + } + + head, err := repo.Head() + if err != nil { + logrus.Fatal(err) + } + if internal.Dry { logrus.Info("dry run: no changes published") } else { - url := fmt.Sprintf("%s/recipes", config.REPOS_BASE_URL) + url := fmt.Sprintf("%s/recipes/%s", config.REPOS_BASE_URL, head.Hash()) logrus.Infof("new changes published: %s", url) }