-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (24 loc) · 900 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
GOOS := linux
GOARCH := amd64
BUILD := $(shell git rev-parse --short HEAD)
LDFLAGS = -ldflags "-X=main.Build=$(BUILD)"
.PHONY: build
build: build-master build-worker build-notification build-client
.PHONY: build-master
build-master: build-proto
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o ./bin/runner-master $(LDFLAGS) -v ./cmd/master
.PHONY: build-worker
build-worker: build-proto
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o ./bin/runner-worker $(LDFLAGS) -v ./cmd/worker
.PHONY: build-notification
build-notification:
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o ./bin/notification $(LDFLAGS) -v ./cmd/notification
.PHONY: build-client
build-client: build-proto
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o ./bin/client $(LDFLAGS) -v ./cmd/client
.PHONY: build-proto
build-proto: ./proto/*.proto
protoc -I ./proto --go_out=plugins=grpc:./proto ./proto/*.proto
.PHONY: clean
clean:
rm -f bin/*