-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
36 lines (30 loc) · 779 Bytes
/
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
BINARY := terraform-provider-validation
LOCALPATH := ~/.terraform.d/plugins/github.com/tlkamp/validation/0.0.1/linux_amd64/
DOCS := docs/
.PHONY:
gendocs:
@go get github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
@go generate
.PHONY:
test:
@go test -v ./...
.PHONY:
acctest:
@TF_ACC=true go test -coverprofile=.coverage.txt -v ./...
@go tool cover -html=.coverage.txt -o ./coverage.html
$(BINARY): gendocs test acctest
@go build -o $(BINARY)
.PHONY:
testinstall: $(BINARY)
@mkdir -p $(LOCALPATH)
@rm -f terraform/.terraform.lock.hcl
@mv $(BINARY) $(LOCALPATH)
.PHONY:
clean:
@go mod tidy
@go clean -testcache
@rm -f $(LOCALPATH)/$(BINARY)
@rm -f terraform/.terraform.lock.hcl
@rm -rf terraform/.terraform
@rm -f .coverage.txt
@rm -f coverage.html