parent
299276c383
commit
ce96269be0
|
@ -202,7 +202,9 @@ keys configured on your account.
|
|||
}
|
||||
|
||||
if isClean {
|
||||
logrus.Fatalf("no changes discovered in %s, nothing to publish?", cataloguePath)
|
||||
if !internal.Dry {
|
||||
logrus.Fatalf("no changes discovered in %s, nothing to publish?", cataloguePath)
|
||||
}
|
||||
}
|
||||
|
||||
msg := "chore: publish new catalogue release changes"
|
||||
|
@ -235,10 +237,12 @@ keys configured on your account.
|
|||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
if !internal.Dry {
|
||||
if !internal.Dry && internal.Publish {
|
||||
url := fmt.Sprintf("%s/recipes/commits/%s", config.REPOS_BASE_URL, head.Hash())
|
||||
logrus.Infof("new changes published: %s", url)
|
||||
} else {
|
||||
}
|
||||
|
||||
if internal.Dry {
|
||||
logrus.Info("dry run: no changes published")
|
||||
}
|
||||
|
||||
|
|
|
@ -231,7 +231,9 @@ func commitRelease(recipe recipe.Recipe, tag string) error {
|
|||
}
|
||||
|
||||
if isClean {
|
||||
return fmt.Errorf("no changes discovered in %s, nothing to publish?", recipe.Dir())
|
||||
if !internal.Dry {
|
||||
return fmt.Errorf("no changes discovered in %s, nothing to publish?", recipe.Dir())
|
||||
}
|
||||
}
|
||||
|
||||
if internal.Publish {
|
||||
|
@ -296,6 +298,8 @@ func pushRelease(recipe recipe.Recipe, tagString string) error {
|
|||
if !internal.Dry {
|
||||
url := fmt.Sprintf("%s/%s/tags/%s", config.REPOS_BASE_URL, recipe.Name, tagString)
|
||||
logrus.Infof("new release published: %s", url)
|
||||
} else {
|
||||
logrus.Info("dry run: no changes published")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
// CreateRemote creates a new git remote in a repository
|
||||
func CreateRemote(repo *git.Repository, name, url string, dryRun bool) error {
|
||||
if dryRun {
|
||||
logrus.Infof("dry run: remote %s (%s) not created", name, url)
|
||||
logrus.Debugf("dry run: remote %s (%s) not created", name, url)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue