Fix #514
This commit is contained in:
parent
3cfa4a581c
commit
ac2055e33c
1 changed files with 5 additions and 2 deletions
|
@ -11,6 +11,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/Unknwon/macaron"
|
"github.com/Unknwon/macaron"
|
||||||
"github.com/codegangsta/cli"
|
"github.com/codegangsta/cli"
|
||||||
|
@ -26,6 +27,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/auth/apiv1"
|
"github.com/gogits/gogs/modules/auth/apiv1"
|
||||||
"github.com/gogits/gogs/modules/avatar"
|
"github.com/gogits/gogs/modules/avatar"
|
||||||
"github.com/gogits/gogs/modules/base"
|
"github.com/gogits/gogs/modules/base"
|
||||||
|
"github.com/gogits/gogs/modules/git"
|
||||||
"github.com/gogits/gogs/modules/log"
|
"github.com/gogits/gogs/modules/log"
|
||||||
"github.com/gogits/gogs/modules/middleware"
|
"github.com/gogits/gogs/modules/middleware"
|
||||||
"github.com/gogits/gogs/modules/middleware/binding"
|
"github.com/gogits/gogs/modules/middleware/binding"
|
||||||
|
@ -60,7 +62,8 @@ func checkVersion() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Macaron.
|
// 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)")
|
log.Fatal(4, "Macaron version does not match, did you forget to update?(github.com/Unknwon/macaron)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue