forked from toolshed/abra
refactor: use central logger
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"github.com/go-git/go-git/v5"
|
||||
"github.com/go-git/go-git/v5/config"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// 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.Debugf("dry run: no git changes pushed in %s", repoDir)
|
||||
log.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.Debugf("git changes pushed")
|
||||
log.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.Debugf("git tags pushed")
|
||||
log.Debugf("git tags pushed")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user