forked from MyPureCloud/terraform-provider-genesyscloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
31 lines (23 loc) · 741 Bytes
/
GNUmakefile
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
default: build
.PHONY: testacc clean build sideload
DIST_DIR=./dist
BIN_NAME=terraform-provider-genesyscloud
BIN_PATH=${DIST_DIR}/${BIN_NAME}
PLUGINS_DIR=~/.terraform.d/plugins
PLUGIN_PATH=genesys.com/mypurecloud/genesyscloud
DEV_VERSION=0.1.0
# Run acceptance tests
testacc:
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m -parallel 20
clean:
rm -f -r ${DIST_DIR}
rm -f -r ${PLUGINS_DIR}/${PLUGIN_PATH}
rm -f -r ./.terraform
build:
mkdir -p ${DIST_DIR}
go build -o ${DIST_DIR} ./...
GOOS = $(shell go env GOOS)
GOARCH = $(shell go env GOARCH)
sideload: build
mkdir -p ${PLUGINS_DIR}/${PLUGIN_PATH}/${DEV_VERSION}/$(GOOS)_$(GOARCH)
cp ${BIN_PATH} ${PLUGINS_DIR}/${PLUGIN_PATH}/${DEV_VERSION}/$(GOOS)_$(GOARCH)/${BIN_NAME}