Cloak/Makefile

31 lines
696 B
Makefile
Raw Normal View History

2018-12-17 22:12:38 +00:00
default: all
version=$(shell ver=$$(git log -n 1 --pretty=oneline --format=%D | awk -F, '{print $$1}' | awk '{print $$3}'); \
if [ "$$ver" = "master" ] ; then \
ver="master($$(git log -n 1 --pretty=oneline --format=%h))" ; \
fi ; \
echo $$ver)
client:
2019-01-12 15:38:11 +00:00
mkdir -p build
2018-12-22 23:58:03 +00:00
go build -ldflags "-X main.version=${version}" ./cmd/ck-client
mv ck-client* ./build
2018-12-17 22:12:38 +00:00
server:
2019-01-12 15:38:11 +00:00
mkdir -p build
2018-12-22 23:58:03 +00:00
go build -ldflags "-X main.version=${version}" ./cmd/ck-server
mv ck-server* ./build
2018-12-17 22:12:38 +00:00
server_pprof:
mkdir -p build
go build -ldflags "-X main.version=${version}" -tags pprof ./cmd/ck-server
mv ck-server* ./build
2018-12-17 22:12:38 +00:00
install:
mv build/ck-* /usr/local/bin
all: client server
clean:
rm -rf ./build/ck-*