Feat: cross compile script

This commit is contained in:
HFO4
2020-03-09 16:53:01 +08:00
parent 30311d181d
commit 68d3131521
16 changed files with 215 additions and 75 deletions

View File

@@ -89,7 +89,7 @@ func Init(path string) {
"{SessionSecret}": util.RandStringRunes(64),
"{HashIDSalt}": util.RandStringRunes(64),
}, defaultConf)
f, err := util.CreatNestedFile("conf.ini")
f, err := util.CreatNestedFile(path)
if err != nil {
util.Log().Panic("无法创建配置文件, %s", err)
}
@@ -101,7 +101,6 @@ func Init(path string) {
}
f.Close()
path = "conf.ini"
}
cfg, err = ini.Load(path)
@@ -125,6 +124,13 @@ func Init(path string) {
}
}
// 重设log等级
if !SystemConfig.Debug {
util.Level = util.LevelInformational
util.GloablLogger = nil
util.Log()
}
}
// mapSection 将配置文件的 Section 映射到结构体上

View File

@@ -1,13 +1,13 @@
package conf
// BackendVersion 当前后端版本号
var BackendVersion = "3.0.0-beta1"
var BackendVersion = "3.0.0-alpha1"
// RequiredDBVersion 与当前版本匹配的数据库版本
var RequiredDBVersion = "3.0.0-beta1"
var RequiredDBVersion = "3.0.0-alpha1"
// IsPro 是否为Pro版本
var IsPro = "true"
// LastCommit 最后commit id
var LastCommit = ""
var LastCommit = "a11f819"