forked from x/ContextOS
opt some
This commit is contained in:
parent
67f57b20ab
commit
4e1092be0c
5
Makefile
5
Makefile
@ -1,8 +1,7 @@
|
|||||||
export GOPROXY=https://goproxy.cn
|
export GOPROXY=https://goproxy.cn
|
||||||
export GOPRIVATE=github.com
|
export GOPRIVATE=github.com
|
||||||
# export CGO_ENABLED=0
|
export CGO_ENABLED=0
|
||||||
|
|
||||||
meta_info = "-X main.Time=`date +"%Y-%m-%d_%H:%M:%S"` -X main.Version=`git describe --tags` -X main.HostName=`hostname` -X main.UserName=`whoami`"
|
|
||||||
all:
|
all:
|
||||||
@echo && date
|
@echo && date
|
||||||
go build -ldflags $(meta_info) -v -o bin/ice.bin src/main.go && chmod u+x bin/ice.bin && ./bin/ice.sh restart
|
go build -v -o bin/ice.bin src/main.go && chmod u+x bin/ice.bin && ./bin/ice.sh restart
|
||||||
|
14
src/main.go
14
src/main.go
@ -36,18 +36,4 @@ import (
|
|||||||
_ "github.com/shylinux/mysql-story/src/server"
|
_ "github.com/shylinux/mysql-story/src/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
Time string
|
|
||||||
Version string
|
|
||||||
HostName string
|
|
||||||
UserName string
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
ice.Info.Build.Time = Time
|
|
||||||
ice.Info.Build.Version = Version
|
|
||||||
ice.Info.Build.HostName = HostName
|
|
||||||
ice.Info.Build.UserName = UserName
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() { print(ice.Run()) }
|
func main() { print(ice.Run()) }
|
||||||
|
@ -92,4 +92,3 @@ table `
|
|||||||
阿里 Amazon
|
阿里 Amazon
|
||||||
`
|
`
|
||||||
|
|
||||||
source hi/hi.shy
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user