mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	models: fix XORM API break
cmd/web.go: check version after load config
This commit is contained in:
		@@ -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()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								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())
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -1 +1 @@
 | 
			
		||||
0.5.13.0212 Beta
 | 
			
		||||
0.5.13.0214 Beta
 | 
			
		||||
		Reference in New Issue
	
	Block a user