forked from ianlewis/memcached-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (25 loc) · 992 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
33
REGISTRY := ianmlewis/memcached-operator
BUILD_TAG := dev
VERSION := $(shell cat VERSION)
GOOS := linux
GOARCH := amd64
.PHONY: codegen image test clean mcrouter
codegen:
./hack/update-codegen.sh
memcached-operator: codegen
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build .
image: memcached-operator
docker build --build-arg BUILD_DATE=$(shell date --iso-8601=minutes) --build-arg VCS_REF=$(shell git log -1 --oneline | awk '{ print $$1 }') --build-arg VERSION=$(VERSION) -t $(REGISTRY):v$(VERSION) .
mcrouter:
cd containers/mcrouter && make
test:
$(eval NOHEADERS = $(shell find . -path ./vendor -prune -o -path ./third_party -prune -o -type f \( -iname \*.go -o -iname \*.yaml -o -iname \*.yml -o -iname \*.sh \) -print0 | xargs -r -0 grep -Le "Copyright [0-9][0-9][0-9][0-9] Google LLC"))
@true
@if [ "$(NOHEADERS)" != "" ]; then \
echo "License headers missing for files:"; \
echo $(NOHEADERS); \
false; \
fi
go test -v ./...
clean:
rm -f memcached-operator