From 685ed1f8075c0fedc2cfaf0f8c43f9439132e1da Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 14 Feb 2015 17:01:33 -0500 Subject: [PATCH] models: fix XORM API break cmd/web.go: check version after load config --- cmd/web.go | 3 +-- gogs.go | 2 +- models/models.go | 2 +- templates/.VERSION | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/web.go b/cmd/web.go index 3284acb9df..4b06a882c0 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -166,12 +166,11 @@ func newMacaron() *macaron.Macaron { } func runWeb(ctx *cli.Context) { - checkVersion() - if ctx.IsSet("config") { setting.CustomConf = ctx.String("config") } routers.GlobalInit() + checkVersion() m := newMacaron() diff --git a/gogs.go b/gogs.go index 76c6c71fc3..34790b7258 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.5.13.0212 Beta" +const APP_VER = "0.5.13.0214 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/models/models.go b/models/models.go index 35e803834c..486aceac22 100644 --- a/models/models.go +++ b/models/models.go @@ -121,7 +121,7 @@ func SetEngine() (err error) { if err != nil { return fmt.Errorf("models.init(fail to create xorm.log): %v", err) } - x.Logger = xorm.NewSimpleLogger(f) + x.SetLogger(xorm.NewSimpleLogger(f)) x.ShowSQL = true x.ShowInfo = true diff --git a/templates/.VERSION b/templates/.VERSION index 6d13155b02..0c9421a4d2 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.5.13.0212 Beta \ No newline at end of file +0.5.13.0214 Beta \ No newline at end of file