forked from GoogleCloudPlatform/terraform-google-conversion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (29 loc) · 1.07 KB
/
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
build_dir=./bin
TF_CONFIG_FILE=tf-dev-override.tfrc
build:
GO111MODULE=on go build -o ${build_dir}/tfplan2cai ./cmd/tfplan2cai
test:
go version
terraform --version
./config-tf-dev-override.sh
TF_CLI_CONFIG_FILE="${PWD}/${TF_CONFIG_FILE}" GO111MODULE=on go test -short ./...
test-integration:
go version
terraform --version
./config-tf-dev-override.sh
TF_CLI_CONFIG_FILE="${PWD}/${TF_CONFIG_FILE}" go test -run=CLI ./...
test-go-licenses:
cd .. && go version && go install github.com/google/go-licenses@latest
$$(go env GOPATH)/bin/go-licenses check ./... --ignore github.com/dnaeon/go-vcr
run-docker:
docker run -it \
-v `pwd`:/terraform-google-conversion \
-v ${GOOGLE_APPLICATION_CREDENTIALS}:/terraform-google-conversion/credentials.json \
-w /terraform-google-conversion \
--entrypoint=/bin/bash \
--env TEST_PROJECT=${PROJECT_ID} \
--env GOOGLE_APPLICATION_CREDENTIALS=/terraform-google-conversion/credentials.json \
gcr.io/graphite-docker-images/go-plus;
release:
./release.sh ${VERSION}
.PHONY: build test test-integration test-go-licenses run-docker release