-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (39 loc) · 1 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
TAG?=$(shell git describe --abbrev=0 --tags 2>/dev/null || echo "v0.0.0" )
COMMIT?=$(shell git rev-parse HEAD)
default: build
.PHONY: generate
generate:
@go generate
.PHONY: build
build:
COMMIT=$(COMMIT) TAG=$(TAG) goreleaser build --snapshot --clean
.PHONY: test
test:
CGO_ENABLED=0 go test -cover --count=1 ./...
.PHONY: clean
clean:
./scripts/clean.sh
.PHONY: verify
verify:
./scripts/verify.sh
.PHONY: chart
chart:
TAG=$(TAG) ./scripts/chart.sh
.PHONY: image
image:
TAG=$(TAG) ./scripts/image.sh
.PHONY: image-push
image-push:
TAG=$(TAG) BUILDX_OPTIONS="--push" ./scripts/image.sh
.PHONY: help
help:
@echo "Usage:"
@echo " make build build binary files"
@echo " make test run unit tests"
@echo " make generate run code generator"
@echo " make verify verify modules"
@echo " make chart package helm charts"
@echo " make image build container images"
@echo " make image-push build container images and push"
@echo " make clean clean up built files"
@echo " make help show this message"