forked from Kong/kubernetes-ingress-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (37 loc) · 912 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
REGISTRY?=kong-docker-kubernetes-ingress-controller.bintray.io
TAG?=0.7.1
REPO_INFO=$(shell git config --get remote.origin.url)
IMGNAME?=kong-ingress-controller
IMAGE = $(REGISTRY)/$(IMGNAME)
ifndef COMMIT
COMMIT := $(shell git rev-parse --short HEAD)
endif
export GO111MODULE=on
.PHONY: test-all
test-all: lint fmt vet test
.PHONY: test
test:
go test -race ./...
.PHONY: vet
vet:
go vet ./...
lint:
golint -set_exit_status ./...
.PHONY: build
build:
CGO_ENABLED=0 go build -o kong-ingress-controller ./cli/ingress-controller
.PHONY: fmt
fmt:
bash -c "diff -u <(echo -n) <(gofmt -d -l -e -s .)"
.PHONY: verify-codegen
verify-codegen:
./hack/verify-codegen.sh
.PHONY: update-codegen
update-codegen:
./hack/update-codegen.sh
.PHONY: container
container:
docker build \
--build-arg TAG=${TAG} --build-arg COMMIT=${COMMIT} \
--build-arg REPO_INFO=${REPO_INFO} \
-t ${IMAGE}:${TAG} .