bug fixed
This commit is contained in:
parent
87eb2c3665
commit
597f5ede12
|
@ -33,18 +33,12 @@ func runUpdate(c *cli.Context) {
|
||||||
base.NewConfigContext()
|
base.NewConfigContext()
|
||||||
models.LoadModelsConfig()
|
models.LoadModelsConfig()
|
||||||
models.NewEngine()
|
models.NewEngine()
|
||||||
//level := "0"
|
|
||||||
//os.MkdirAll("log", os.ModePerm)
|
|
||||||
//log.NewLogger(10000, "file", fmt.Sprintf(`{"level":%s,"filename":"%s"}`, level, "log/serv.log"))
|
|
||||||
//log.Info("start update logging...")
|
|
||||||
|
|
||||||
w, _ := os.Create("update.log")
|
w, _ := os.Create("update.log")
|
||||||
defer w.Close()
|
defer w.Close()
|
||||||
|
|
||||||
log.SetOutput(w)
|
log.SetOutput(w)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
args := c.Args()
|
args := c.Args()
|
||||||
if len(args) != 3 {
|
if len(args) != 3 {
|
||||||
log.Error("received less 3 parameters")
|
log.Error("received less 3 parameters")
|
||||||
|
@ -143,7 +137,7 @@ func runUpdate(c *cli.Context) {
|
||||||
|
|
||||||
//commits = append(commits, []string{lastCommit.Id().String(), lastCommit.Message()})
|
//commits = append(commits, []string{lastCommit.Id().String(), lastCommit.Message()})
|
||||||
if err = models.CommitRepoAction(int64(sUserId), userName,
|
if err = models.CommitRepoAction(int64(sUserId), userName,
|
||||||
repos.Id, repoName, refName, &base.PushCommits{l.Len(), commits}); err != nil {
|
repos.Id, repoName, git.BranchName(refName), &base.PushCommits{l.Len(), commits}); err != nil {
|
||||||
log.Error("runUpdate.models.CommitRepoAction: %v", err)
|
log.Error("runUpdate.models.CommitRepoAction: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue