-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
51 lines (38 loc) · 1.46 KB
/
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
export SERVICE_NAME=xds-relay
.PHONY: setup
setup:
mkdir -p ./bin
.PHONY: compile
compile: setup ## Compiles the binary
go build -o ./bin/${SERVICE_NAME}
.PHONY: install
install: ## Installs dependencies
go mod vendor
.PHONY: unit
unit: ## Run all unit tests with coverage report
go test -v -cover ./...
.PHONY: integration-tests
integration-tests: ## Run integration tests
go test -tags integration -v ./integration/
.PHONY: e2e-tests
e2e-tests: ## Run e2e tests
go test -parallel 1 -tags end2end,docker -v ./integration/
.PHONY: compile-protos
compile-protos: ## Compile proto files
./scripts/generate-api-protos.sh
.PHONY: compile-validator-tool
compile-validator-tool: setup ## Compiles configuration validator tool
go build -o ./bin/configuration-validator $$(go list ./tools/configuration-validator)
.PHONY: build-e2e-tests-docker-image
build-e2e-tests-docker-image: ## Build docker image for use in e2e tests
docker build . --file Dockerfile-e2e-tests --tag xds-relay
.PHONY: lint
lint: ## Run golangci-lint
golangci-lint run
.PHONY: build-example-management-server
build-example-management-server: compile ## Build example management server
go build -o ./bin/example-management-server example/main.go
# Absolutely awesome: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
help:
@grep -E '^[[:alnum:]-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := compile