-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
34 lines (25 loc) · 981 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
TEST?=$$(go list ./... | grep -v 'vendor')
HOSTNAME=registry.terraform.io
NAMESPACE=chaossearch
NAME=chaossearch
BINARY=terraform-provider-${NAME}
VERSION=1.0.21
OS_ARCH=$(shell go env GOOS)_$(shell go env GOARCH)
default: install
lintProvider:
golangci-lint run -c .golangci.yml
build: lintProvider
go build -o ${BINARY}
runEx: install
cd provider/examples && terraform init && terraform apply --auto-approve
runExDeleteTF: install
cd provider/examples && rm -rf .terraform .terraform* *.tfstate* && terraform init && terraform apply --auto-approve
release:
GOOS=darwin GOARCH=arm64 go build -o ./bin/${BINARY}_${VERSION}_${OS_ARCH}
install: build
mkdir -p ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
mv ${BINARY} ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
initTestInfra:
cd provider/tests/test-infra && terraform init && terraform apply
testAcc: install
TF_ACC=1 go test -v ./provider/tests/