feat: link directly to new commit
continuous-integration/drone/push Build is passing Details

This commit is contained in:
decentral1se 2021-12-28 02:37:35 +01:00
parent b4f48c3c59
commit 26a11533b4
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 12 additions and 2 deletions

View File

@ -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)
}