refactor!: simplifying publish logic

This commit is contained in:
2021-12-27 19:56:27 +01:00
parent eb1b6be4c5
commit 0aa37fcee8
10 changed files with 137 additions and 168 deletions

View File

@ -9,7 +9,7 @@ import (
// Push pushes the latest changes & optionally tags to the default remote
func Push(repoDir string, remote string, tags bool, dryRun bool) error {
if dryRun {
logrus.Infof("dry run: no git changes pushed in %s", repoDir)
logrus.Debugf("dry run: no git changes pushed in %s", repoDir)
return nil
}
@ -27,7 +27,7 @@ func Push(repoDir string, remote string, tags bool, dryRun bool) error {
return err
}
logrus.Info("git changes pushed")
logrus.Debugf("git changes pushed")
if tags {
opts.RefSpecs = append(opts.RefSpecs, config.RefSpec("+refs/tags/*:refs/tags/*"))
@ -36,7 +36,7 @@ func Push(repoDir string, remote string, tags bool, dryRun bool) error {
return err
}
logrus.Info("git tags pushed")
logrus.Debugf("git tags pushed")
}
return nil