-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
version=$(shell git rev-parse --short HEAD) | ||
|
||
idl: | ||
rm -rf pb/*.pb.go | ||
protoc -I=. pb/*.proto --go_out=plugins=grpc:. | ||
|
||
bin: | ||
rm -rf exec_bin | ||
mkdir exec_bin | ||
go build -ldflags "-s -w" -o ./exec_bin/client ./client/*.go | ||
go build -ldflags "-s -w" -o ./exec_bin/server ./server/*.go | ||
GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w -X main.version=$(version)" -o ./exec_bin/server-darwin ./server/*.go | ||
GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w -X main.version=$(version)" -o ./exec_bin/client-darwin ./client/*.go | ||
GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -X main.version=$(version)" -o ./exec_bin/server-linux ./server/*.go | ||
GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -X main.version=$(version)" -o ./exec_bin/client-linux ./client/*.go | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters