-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 978 Bytes
/
Makefile
File metadata and controls
31 lines (23 loc) · 978 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
.PHONY: build build-windows test clean document
VERSION ?= 2.0.0
# Build will only work *if* the tests pass, this is to ensure that the provider is in a good state before building.
# The output will be a binary named terraform-provider-catchpoint_v$(VERSION) (as expected by terraform override).
build:
go test ./...
go build -ldflags "-X main.version=$(VERSION)" -o terraform-provider-catchpoint_v$(VERSION)
build-windows:
go test ./...
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o terraform-provider-catchpoint_v$(VERSION).exe
test:
go test ./... -coverprofile=coverage.out
go tool cover -html=coverage.out -o ./coverage.html
clean:
rm -f terraform-provider-catchpoint*
document:
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs --provider-name=catchpoint --examples-dir=./examples
snapshot:
goreleaser build --snapshot --clean
release:
goreleaser release --skip=publish --clean
vuln-check:
govulncheck ./...