26 lines
497 B
Go
26 lines
497 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"game/server/gate/cmd"
|
|
"github.com/fox/fox/ksync"
|
|
"github.com/fox/fox/log"
|
|
"time"
|
|
)
|
|
|
|
var (
|
|
GitCommit = "unknown"
|
|
GitBranch = "unknown"
|
|
BuildDate = "unknown"
|
|
)
|
|
|
|
func main() {
|
|
tm, err := time.Parse("20060102150405", BuildDate)
|
|
if err == nil {
|
|
BuildDate = tm.Format("2006-01-02 15:04:05")
|
|
}
|
|
ksync.RunSafe(func() {
|
|
cmd.Run(fmt.Sprintf("版本分支:%v,hash值:%v,编译时间:%v", GitBranch, GitCommit, BuildDate))
|
|
}, func() { log.Debug("reset run") })
|
|
}
|