-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 815 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 815 Bytes
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
.PHONY: clean test test-e2e deps build bootstrap-tools image
HACKDIR=./hack/bin
GORELEASER_CMD=$(HACKDIR)/goreleaser
ORG ?= ca-gip
VERSION=$(shell git rev-parse --short HEAD)
$(HACKDIR):
mkdir -p $(HACKDIR)
bootstrap-tools: $(HACKDIR)
command -v $(HACKDIR)/goreleaser || VERSION=v2.5.0 TMPDIR=$(HACKDIR) bash hack/goreleaser-install.sh
command -v staticcheck || go install honnef.co/go/tools/cmd/staticcheck@latest
chmod +x $(HACKDIR)/goreleaser
clean:
rm -rf vendor build/*
build: bootstrap-tools deps
ORG=${ORG} $(GORELEASER_CMD) release --clean --snapshot
deps:
go mod tidy
go mod vendor
bash hack/update-codegen.sh
go mod tidy
test: bootstrap-tools
go test $$(go list ./... | grep -v /e2e) -coverprofile cover.out
staticcheck ./...
image: build
test-e2e:
go test ./test/e2e/ -v -ginkgo.v