forked from rewe-digital/terraform-provider-sonarcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 849 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
37
TESTARGS?=$$(go list ./... | grep -v 'vendor')
HOSTNAME=rewe-digital.com
NAMESPACE=platform
NAME=sonarcloud
VERSION?=0.1.0-local
OS_ARCH?=linux_amd64
BINARY_GLOB=./dist/terraform-provider-${NAME}_${OS_ARCH}/terraform*
default: install
build:
GORELEASER_CURRENT_TAG=$(VERSION) goreleaser build --snapshot --rm-dist
install: build
mkdir -p ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
mv $(BINARY_GLOB) ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
test:
go test -i $(TEST) || exit 1
echo $(TEST) | xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
testacc:
TF_ACC=1 go test -p 1 $(TEST) -v $(TESTARGS) -timeout 120m
debug-test:
TF_ACC=true dlv test ./sonarcloud
fmt:
go fmt ./sonarcloud
docs:
go generate ./...
docs-check: docs
git diff --quiet
.PHONY: docs