WIP: feat: translation support
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
See #483
This commit is contained in:
@ -1,16 +1,17 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"errors"
|
||||
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"github.com/go-git/go-git/v5"
|
||||
"coopcloud.tech/abra/pkg/i18n"
|
||||
)
|
||||
|
||||
// Commit runs a git commit
|
||||
func Commit(repoPath, commitMessage string, dryRun bool) error {
|
||||
if commitMessage == "" {
|
||||
return fmt.Errorf("no commit message specified?")
|
||||
return errors.New(i18n.G("no commit message specified?"))
|
||||
}
|
||||
|
||||
commitRepo, err := git.PlainOpen(repoPath)
|
||||
@ -38,9 +39,9 @@ func Commit(repoPath, commitMessage string, dryRun bool) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.Debug("git changes commited")
|
||||
log.Debug(i18n.G("git changes commited"))
|
||||
} else {
|
||||
log.Debug("dry run: no changes commited")
|
||||
log.Debug(i18n.G("dry run: no changes commited"))
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user