forked from toolshed/abra
feat: add dryflag, implement push for catalogue generate
This commit is contained in:
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// Commit runs a git commit
|
||||
func Commit(glob, commitMessage string, dryRun bool) error {
|
||||
func Commit(glob, commitMessage string, dryRun, push bool) error {
|
||||
if commitMessage == "" {
|
||||
return fmt.Errorf("no commit message specified?")
|
||||
}
|
||||
@ -55,7 +55,7 @@ func Commit(glob, commitMessage string, dryRun bool) error {
|
||||
logrus.Info("dry run: no changes commited")
|
||||
}
|
||||
|
||||
if !dryRun {
|
||||
if !dryRun && push {
|
||||
if err := commitRepo.Push(&git.PushOptions{}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user