diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-09-29 05:38:46 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-09-29 05:38:46 -0400 |
commit | ac2055e33cb08f9d11fc7322739ad46a6213dd7f (patch) | |
tree | 2912498e4f952f15b5896e9bc7dfc812290d166d /cmd | |
parent | 3cfa4a581ca3cf3cb5e5105725d77f4c594de478 (diff) | |
download | gitea-ac2055e33cb08f9d11fc7322739ad46a6213dd7f.tar.gz gitea-ac2055e33cb08f9d11fc7322739ad46a6213dd7f.zip |
Fix #514
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go index a7f7de0bbe..72a58bc995 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -11,6 +11,7 @@ import ( "net/http" "os" "path" + "strings" "github.com/Unknwon/macaron" "github.com/codegangsta/cli" @@ -26,6 +27,7 @@ import ( "github.com/gogits/gogs/modules/auth/apiv1" "github.com/gogits/gogs/modules/avatar" "github.com/gogits/gogs/modules/base" + "github.com/gogits/gogs/modules/git" "github.com/gogits/gogs/modules/log" "github.com/gogits/gogs/modules/middleware" "github.com/gogits/gogs/modules/middleware/binding" @@ -60,7 +62,8 @@ func checkVersion() { } // Macaron. - if macaron.Version() != "0.1.8.0927" { + macaronVer := git.MustParseVersion(strings.Join(strings.Split(macaron.Version(), ".")[:3], ".")) + if macaronVer.LessThan(git.MustParseVersion("0.1.8")) { log.Fatal(4, "Macaron version does not match, did you forget to update?(github.com/Unknwon/macaron)") } } @@ -351,7 +354,7 @@ func runWeb(*cli.Context) { r.Get("/pulls", repo.Pulls) r.Get("/branches", repo.Branches) r.Get("/archive/*", repo.Download) - r.Get("/issues2/",repo.Issues2) + r.Get("/issues2/", repo.Issues2) }, ignSignIn, middleware.RepoAssignment(true)) m.Group("/:username/:reponame", func(r *macaron.Router) { |