forked from uswitch/kiam
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (23 loc) · 841 Bytes
/
Makefile
File metadata and controls
33 lines (23 loc) · 841 Bytes
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
33
ARCH=amd64
BIN = bin/kiam
BIN_LINUX = $(BIN)-linux-$(ARCH)
BIN_DARWIN = $(BIN)-darwin-$(ARCH)
SOURCES := $(shell find . -iname '*.go') proto/service.pb.go
.PHONY: test clean all
all: proto/service.pb.go build-darwin build-linux
build-darwin: $(SOURCES)
GOARCH=$(ARCH) GOOS=darwin go build -o $(BIN_DARWIN) cmd/kiam/*.go
build-linux: $(SOURCES)
GOARCH=$(ARCH) GOOS=linux CGO_ENABLED=0 go build -o $(BIN_LINUX) cmd/kiam/*.go
proto/service.pb.go: proto/service.proto
go get -u -v github.com/golang/protobuf/protoc-gen-go
protoc -I proto/ proto/service.proto --go_out=plugins=grpc:proto
test: $(SOURCES)
go test test/unit/*_test.go
go test test/functional/*_test.go
bench: $(SOURCES)
go test -run=XX -bench=. test/unit/*.go
docker: Dockerfile $(BIN_LINUX)
docker image build -t quay.io/uswitch/kiam:devel .
clean:
rm -rf bin/