-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
61 lines (48 loc) · 983 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
49
50
51
52
53
54
55
56
57
58
59
60
61
.ONESHELL:
SHELL := /bin/bash
GOBIN ?= $(GOPATH)/bin
MODULE = github.com/howardjohn/pilot-load
HUB ?= gcr.io/howardjohn-istio
export GO111MODULE ?= on
all: format lint install
.PHONY: check-git
check-git:
@
if [[ -n $$(git status --porcelain) ]]; then
echo "Error: git is not clean"
git status
git diff
exit 1
fi
.PHONY: gen-check
gen-check: format check-git
.PHONY: format
format:
@go mod tidy
@gofumpt -w .
@goimports -local $(MODULE) -w .
@gci write -s standard -s default -s Prefix\($(MODULE)\) .
.PHONY: lint
lint:
@golangci-lint run --fix
.PHONY: install
install:
@go install
.PHONY: test
test:
@go test ./...
.PHONY: docker
docker:
docker buildx build . -t ${HUB}/pilot-load --load
.PHONY: push
push:
docker buildx build . -t ${HUB}/pilot-load --push
.PHONY: setup
setup:
./kube/deploy.sh
.PHONY: deploy
deploy:
kubectl apply -f install
all: install docker push deploy
proto:
protoc --go_out=plugins=grpc:${GOPATH}/src xds.proto -Iprotoslim