forked from GoogleCloudPlatform/terraform-validator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
33 lines (23 loc) · 848 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
build_dir=./bin
name=terraform-validator
test:
# Skip integration tests in ./test/ using -short flag
GO111MODULE=on go test -short ./...
run-docker:
docker run -it -v `pwd`:/terraform-validator -v ${GOOGLE_APPLICATION_CREDENTIALS}:/terraform-validator/credentials.json --entrypoint=/bin/bash --env TEST_PROJECT=${PROJECT_ID} --env TEST_CREDENTIALS=./credentials.json terraform-validator;
test-integration:
go version
terraform --version
go test -run=CLI ./test
test-go-licenses:
cd .. && go version && go install github.com/google/go-licenses@latest
$$(go env GOPATH)/bin/go-licenses check .
build-docker:
docker build -f ./Dockerfile -t terraform-validator .
build:
GO111MODULE=on go build -o ${build_dir}/${name}
release:
./release.sh ${VERSION}
clean:
rm bin/${name}*
.PHONY: test test-e2e build build-docker release clean