38 Star 121 Fork 30

flike/kingbus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 814 Bytes
一键复制 编辑 原始数据 按行查看 历史
flike 提交于 2018-12-30 08:08 . first commit
COMMIT_HASH=$(shell git rev-parse --short HEAD || echo "GitNotFound")
BUILD_DATE=$(shell date '+%Y-%m-%d %H:%M:%S')
PKG_NAME=kingbus.$(shell date "+%Y%m%d")
all: kingbus
kingbus:
$(info COMMIT_HASH: $(COMMIT_HASH))
cd ./cmd/kingbus/ && CGO_ENABLED=0 go build -ldflags "-X \"main.BuildVersion=${COMMIT_HASH}\" -X \"main.BuildDate=$(BUILD_DATE)\"" -o ../../build/bin/kingbus
chmod +x ./build/bin/kingbus
cp etc/kingbus.yaml ./build/bin
clean:
@rm -rf build
test:
cd raft/ && go test -v
cd raft/membership && go test -v
cd server && go test -v
cd storage && go test -v
package:kingbus
mkdir -p build/${PKG_NAME}/bin
cp build/bin/kingbus build/${PKG_NAME}/bin
cp etc/kingbus.yaml build/${PKG_NAME}/bin
cd build/${PKG_NAME} && tar -czvf ../${PKG_NAME}.tgz .
rm -rf build/${PKG_NAME}
rm -rf build/bin
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/gocloud/kingbus.git
[email protected]:gocloud/kingbus.git
gocloud
kingbus
kingbus
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385