-
Notifications
You must be signed in to change notification settings - Fork 72
/
GNUmakefile
91 lines (71 loc) · 2.24 KB
/
GNUmakefile
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Test all packages by default
TEST ?= ./...
ifeq ($(shell go env GOOS),darwin)
SEDOPTS = -i ''
else
SEDOPTS = -i
endif
GOWORKFLOWVERSION=$(shell go run ./build-support/go-version-for-workflow)
.PHONY: default
default: build
.PHONY: tools
tools:
cd $(shell go env GOROOT) && go install github.com/hashicorp/go-bindata/go-bindata@latest && go install gotest.tools/gotestsum@latest
.PHONY: pebble-start-install
pebble-start-install: pebble-stop
build-support/scripts/pebble-start.sh --install
.PHONY: pebble-start
pebble-start: pebble-stop
build-support/scripts/pebble-start.sh
.PHONY: pebble-stop
pebble-stop:
build-support/scripts/pebble-stop.sh
.PHONY: memcached-start
memcached-start: memcached-stop
build-support/scripts/memcached-start.sh
.PHONY: memcached-stop
memcached-stop:
build-support/scripts/memcached-stop.sh
.PHONY: stop-services
stop-services: memcached-stop pebble-stop
.PHONY: template-generate
template-generate:
@echo "==> Re-generating templates..."
@go generate ./build-support/generate-dns-providers
.PHONY: provider-generate
provider-generate:
@echo "==> Re-generating Go DNS provider factory in ./acme..."
@go generate ./acme/dnsplugin
@go build ./acme/dnsplugin
@go mod tidy
@echo "==> Re-genrating documentation..."
@rm -f docs/guides/dns-providers-*.md
@go run ./build-support/generate-dns-providers doc docs/guides/
.PHONY: provider-generate-update
provider-generate-update: provider-generate
test -z "$$(git diff acme docs)" || \
{ git add acme docs && \
git commit -m "re-generate lego DNS provider data"; }
.PHONY: proto
proto:
cd proto/ && buf generate
.PHONY: build
build:
go install
.PHONY: release
release:
build-support/scripts/release.sh
.PHONY: build-pre-release
build-pre-release:
mkdir -p /tmp/terraform-provider-acme/
go build -o /tmp/terraform-provider-acme/terraform-provider-acme
.PHONY: clean-pre-release
clean-pre-release:
rm -rf /tmp/terraform-provider-acme/
.PHONY: test
test:
TF_LOG=debug TF_ACC=1 gotestsum --format=short-verbose $(TEST) $(TESTARGS)
.PHONY: go-version-sync
go-version-sync:
sed $(SEDOPTS) -e "s/go-version:.*\$$/go-version: '^$(GOWORKFLOWVERSION)'/g" .github/workflows/*.yml
git add .github/workflows/*.yml && git commit -m "workflows: update Go to version $(GOWORKFLOWVERSION)"