forked from toolshed/abra
refactor: the grand recipe release refactor
This commit is contained in:
@ -2,20 +2,17 @@ package git
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path"
|
||||
|
||||
"coopcloud.tech/abra/pkg/config"
|
||||
"github.com/go-git/go-git/v5"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Commit runs a git commit
|
||||
func Commit(glob, commitMessage string, dryRun, push bool) error {
|
||||
func Commit(repoPath, glob, commitMessage string, dryRun, push bool) error {
|
||||
if commitMessage == "" {
|
||||
return fmt.Errorf("no commit message specified?")
|
||||
}
|
||||
|
||||
repoPath := path.Join(config.ABRA_DIR, "catalogue")
|
||||
commitRepo, err := git.PlainOpen(repoPath)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user