2020-06-09 18:24:17 -07:00
|
|
|
default: update-deps testacc
|
2020-09-17 16:27:48 -04:00
|
|
|
GOOS=$(shell go env GOOS)
|
|
|
|
|
GOARCH=$(shell go env GOARCH)
|
|
|
|
|
INSTALL_PATH=~/.local/share/terraform/plugins/localhost/providers/boundary/0.0.1/linux_$(GOARCH)
|
|
|
|
|
ifeq ($(GOOS), darwin)
|
|
|
|
|
INSTALL_PATH=~/Library/Application\ Support/io.terraform/plugins/localhost/providers/boundary/0.0.1/darwin_$(GOARCH)
|
|
|
|
|
endif
|
|
|
|
|
ifeq ($(GOOS), "windows")
|
|
|
|
|
INSTALL_PATH=%APPDATA%/HashiCorp/Terraform/plugins/localhost/providers/boundary/0.0.1/windows_$(GOARCH)
|
|
|
|
|
endif
|
2020-05-14 17:06:23 -07:00
|
|
|
|
|
|
|
|
# Run acceptance tests
|
|
|
|
|
.PHONY: testacc
|
|
|
|
|
testacc:
|
|
|
|
|
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m
|
2020-06-09 18:24:17 -07:00
|
|
|
|
2020-07-24 20:29:19 -07:00
|
|
|
testacc-ci: install-go
|
2020-09-03 10:14:55 -07:00
|
|
|
git config --global --add url."git@github.com:".insteadOf "https://github.com/"
|
2020-07-24 20:29:19 -07:00
|
|
|
TF_ACC=1 ~/.go/bin/go test ./... -v $(TESTARGS) -timeout 120m
|
|
|
|
|
|
|
|
|
|
install-go:
|
|
|
|
|
./ci/goinstall.sh
|
|
|
|
|
|
2020-06-09 18:24:17 -07:00
|
|
|
update-deps:
|
|
|
|
|
GOPROXY=direct GOSUMDB=off go get -u
|
|
|
|
|
|
|
|
|
|
dev:
|
2020-09-17 16:27:48 -04:00
|
|
|
mkdir -p $(INSTALL_PATH)
|
|
|
|
|
go build -o $(INSTALL_PATH)/terraform-provider-boundary main.go
|