aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/update.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-06-28 23:56:41 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-06-28 23:56:41 +0800
commit1c46d68abaf08890e10386b3af674233b4dda2d3 (patch)
treeee366ead93743202b7a1d92936cbaaed76623867 /cmd/update.go
parent4ce2fa520a1d9c36febd19562015107b74a4bc1d (diff)
downloadgitea-1c46d68abaf08890e10386b3af674233b4dda2d3.tar.gz
gitea-1c46d68abaf08890e10386b3af674233b4dda2d3.zip
bug fixed for message tag
Diffstat (limited to 'cmd/update.go')
-rw-r--r--cmd/update.go27
1 files changed, 20 insertions, 7 deletions
diff --git a/cmd/update.go b/cmd/update.go
index c030b6cfb2..551fd09ef3 100644
--- a/cmd/update.go
+++ b/cmd/update.go
@@ -6,10 +6,8 @@ package cmd
import (
"os"
- "strconv"
"github.com/codegangsta/cli"
-
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/log"
)
@@ -37,12 +35,27 @@ func runUpdate(c *cli.Context) {
log.GitLogger.Fatal("refName is empty, shouldn't use")
}
- userName := os.Getenv("userName")
- userId, _ := strconv.ParseInt(os.Getenv("userId"), 10, 64)
- repoUserName := os.Getenv("repoUserName")
- repoName := os.Getenv("repoName")
+ //userName := os.Getenv("userName")
+ //userId, _ := strconv.ParseInt(os.Getenv("userId"), 10, 64)
+ //repoUserName := os.Getenv("repoUserName")
+ //repoName := os.Getenv("repoName")
+ uuid := os.Getenv("uuid")
+
+ task := models.UpdateTask{
+ Uuid: uuid,
+ RefName: args[0],
+ OldCommitId: args[1],
+ NewCommitId: args[2],
+ }
+
+ log.GitLogger.Error("%v", task)
- if err := models.Update(args[0], args[1], args[2], userName, repoUserName, repoName, userId); err != nil {
+ if err := models.AddUpdateTask(&task); err != nil {
log.GitLogger.Fatal(err.Error())
}
+
+ /*if err := models.Update(args[0], args[1], args[2], userName, repoUserName, repoName, userId); err != nil {
+ log.GitLogger.Fatal(err.Error())
+ }*/
+ //setEnvs(args[0], args[1], args[2], userName, repoUserName, repoName, userId)
}