fix: Uncomment push
This commit is contained in:
1 parent
c4d68efce7
commit
a76307732e
1 file changed
+11
-8
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/go-git/go-git/v5"
|
||||
"github.com/go-git/go-git/v5/config"
|
||||
"github.com/go-git/go-git/v5/plumbing"
|
||||
"github.com/go-git/go-git/v5/plumbing/object"
|
||||
"github.com/go-git/go-git/v5/plumbing/transport"
|
||||
@@ -379,18 +380,20 @@ func update(repository *git.Repository, branch string, auth transport.AuthMethod
|
||||
|
||||
// push
|
||||
log.Debug("Pushing the changes")
|
||||
//err = repository.Push(&git.PushOptions{
|
||||
// Auth: auth,
|
||||
// Progress: os.Stdout,
|
||||
// RemoteName: "origin",
|
||||
// RefSpecs: []config.RefSpec{
|
||||
// config.RefSpec(fmt.Sprintf("refs/heads/%s:refs/heads/%s", branch, branch)),
|
||||
// },
|
||||
//})
|
||||
err = repository.Push(&git.PushOptions{
|
||||
Auth: auth,
|
||||
Progress: os.Stdout,
|
||||
RemoteName: "origin",
|
||||
RefSpecs: []config.RefSpec{
|
||||
config.RefSpec(fmt.Sprintf("refs/heads/%s:refs/heads/%s", branch, branch)),
|
||||
},
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
log.Info("Update complete")
|
||||
}
|
||||
|
||||
func listen(addr string) {
|
||||
|
||||
Reference in new issue
Block a user