-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·19 lines (19 loc) · 976 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Version := beta
.PHONY: test tmpstatik
build: tmpstatik
mkdir -p ./dist
go build -ldflags "-X main.Version=$(Version) -X 'main.BuildTime=`date`' -X 'main.GoVersion=`go version`'" -o ./dist/lile ./lile
go build -ldflags "-X main.Version=$(Version) -X 'main.BuildTime=`date`' -X 'main.GoVersion=`go version`'" -o ./dist/protoc-gen-lile-server ./protoc-gen-lile-server
tar czvf lile.tar.gz -C ./dist .
shasum -a 256 lile.tar.gz
test: tmpstatik
go test ./... -v -count 1 -p 1 -cover
tmpstatik:
#go get github.com/rakyll/statik
statik -src=template
cd protoc-gen-lile-server && statik -src=template
clile: tmpstatik
cd lile && go build -ldflags "-X main.Version=$(Version) -X 'main.BuildTime=`date`' -X 'main.GoVersion=`go version`'" -o /usr/local/bin/lile
cproto: tmpstatik
cd protoc-gen-lile-server && go build -ldflags "-X main.Version=$(Version) -X 'main.BuildTime=`date`' -X 'main.GoVersion=`go version`'" -o /usr/local/bin/protoc-gen-lile-server
default: test