-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
64 lines (47 loc) · 1.36 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
52
53
54
55
56
57
58
59
60
61
62
63
64
.SUFFIXES:
Makefile:;
ACCEPTANCE_TEST_BUILD_CONSTRAINT := acceptance.test
ACCEPTANCE_TEST_DOCKER_COMPOSE_FILE := ./docker-compose.acceptance-test.yaml
CACHE_DIRECTORY := .cache
.DEFAULT_GOAL := test
.PHONY: build
build:
go build ./...
.PHONY: bump-patch-version
bump-patch-version:
./scripts/bump-patch-version.sh
.PHONY: clean
clean: clean-acceptance-test-server clean-cache-directory
.PHONY: clean-acceptance-test-server
clean-acceptance-test-server:
docker compose --file $(ACCEPTANCE_TEST_DOCKER_COMPOSE_FILE) down --remove-orphans --rmi all --volumes
.PHONY: clean-cache-directory
clean-cache-directory:
rm -fr $(CACHE_DIRECTORY)
.PHONY: docs
docs: install
go generate ./...
.PHONY: install
install:
go install ./...
.PHONY: release
release:
goreleaser release --rm-dist
.PHONY: start-acceptance-test-server
start-acceptance-test-server:
docker compose --file $(ACCEPTANCE_TEST_DOCKER_COMPOSE_FILE) up --build --remove-orphans --wait
.PHONY: test
test: build test-docs test-go
.PHONY: test-docs
test-docs: test-docs-up-to-date
.PHONY: test-docs-up-to-date
test-docs-up-to-date:
./scripts/test-docs-up-to-date.sh
.PHONY: test-go
test-go: test-go-unit-test test-go-acceptance-test
.PHONY: test-go-acceptance-test
test-go-acceptance-test:
TF_ACC=1 go test -tags=$(ACCEPTANCE_TEST_BUILD_CONSTRAINT) ./...
.PHONY: test-go-unit-test
test-go-unit-test:
go test ./...