1 Star 1 Fork 4

polarisxu / studygolang

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 668 Bytes
一键复制 编辑 原始数据 按行查看 历史
xuxinhua 提交于 2019-08-10 21:38 . 支持 module 测试验证完毕
.PHONY: build reload start stop
v=""
export GOPROXY=https://goproxy.cn
export GO111MODULE=on
BUILD = $(shell git symbolic-ref HEAD | cut -b 12-)-$(shell git rev-parse HEAD)
build:
if [ ! -d log ]; then mkdir log; fi
gofmt -w -s .
go build -ldflags "-X global.Build=$(BUILD)" -o bin/studygolang github.com/studygolang/studygolang/cmd/studygolang
@echo "build successfully!"
reload:
kill -USR2 `cat pid/*.pid`
echo 'reload successfully'
start:
if [ ! -d pid ]; then mkdir pid; fi
export GOTRACEBACK=crash
ulimit -c unlimited
bin/studygolang >> log/panic.log 2>&1 &
@echo "start successfully"
stop:
kill `cat pid/*.pid`
sleep 1
rm -rf pid/*.pid
Go
1
https://gitee.com/polarisxu/studygolang.git
git@gitee.com:polarisxu/studygolang.git
polarisxu
studygolang
studygolang
master

搜索帮助