diff --git a/.travis.yml b/.travis.yml index 17c49a9644..e6bdd825c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,27 @@ -dist: trusty -sudo: false language: go +sudo: false go: -- 1.9 - -install: -# This script is used by the Travis build to install a cookie for -# go.googlesource.com so rate limits are higher when using `go get` to fetch -# packages that live there. -# See: https://github.com/golang/go/issues/12933 +- '1.10' +before_script: - bash scripts/gogetcookie.sh -- go get github.com/kardianos/govendor - +- go get ./... script: -- make test -- make vendor-status +- make fmtcheck - make vet - +- make test branches: only: - - master -matrix: - fast_finish: true - allow_failures: - - go: tip + - custom +before_deploy: +- make targets +deploy: + provider: releases + api_key: + secure: 3XRh95yUkU1SA/Fwk9beSrSEv0fc1Eot4/MSmOuib1+Do27OKmUVvN6jQkj5dLVoeHJnsv9iAMRxuxmb+YL2HvX2o47cxhwiiB+qU4Jyv2bSuGsapIoyLpUZqhap9VpGsXWlRmXh/gwjovXP22ECayY/5/06hH//JzSXlOa881Z43LLaKHhS1ouVtBYtfPhvCSQI+MMVjBYKYyijVPXePmjoa5z++WQg3DewGIv9yXUy+96ndKWNbihsDubMQbgbzmi+BPQueAF3H/rIbsVCx42eon3CXdBHBfQxWl7M7UXJphrTNZIIUcwYqKn5dgg1LJ5WYDy4M9vu0LQ8bzp23AvLPdC2infrm+yi2Ej6wNn7bcpff+4Dy1rGtwawcn6tFwuV01I+imFEjE8+hAxjRR0R2d7BjvWyQF0rOEdBVJnA8CDffdjJi7ZQS0WSVqdLGfpeYZS+/z/I0So7S3NTPBXpaUSBkmuXloIVsgf9zhRmVzThagj+euyf5t5hWiiERa8RpNg5xMyzWdofemX4WbPdhyF0VbupZRXE/gnPiZ7vAUzgcf28RfIWiFVzZ+OtexakZpK3Ylb24xeQMgXOX1qPa81W3x7KgS1jesoD7LVyY31YM03qmmmfWG7V4a3I1bm140gdCDfXPYS+hMSbG3rsB3WqIhKNdzIIIh3pXCo= + file: dist/*.zip + file_glob: true + skip_cleanup: true + on: + repo: sl1pm4t/terraform-provider-kubernetes + tags: true + branch: custom diff --git a/GNUmakefile b/GNUmakefile index c9eacb4511..79eac35c89 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,5 +1,6 @@ TEST?=$$(go list ./... |grep -v 'vendor') GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor) +TARGETS=darwin linux windows default: build @@ -7,9 +8,9 @@ build: fmtcheck go install test: fmtcheck - go test -i $(TEST) || exit 1 + go test -v -i $(TEST) || exit 1 echo $(TEST) | \ - xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4 + xargs -t -n4 go test -v $(TESTARGS) -timeout=30s -parallel=4 testacc: fmtcheck TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m @@ -43,5 +44,11 @@ test-compile: fi go test -c $(TEST) $(TESTARGS) -.PHONY: build test testacc vet fmt fmtcheck errcheck vendor-status test-compile +targets: $(TARGETS) + +$(TARGETS): + GOOS=$@ GOARCH=amd64 go build -o "dist/$@/terraform-provider-tfstate_${TRAVIS_TAG}_x4" + zip -j dist/terraform-provider-tfstate_${TRAVIS_TAG}_$@_amd64.zip dist/$@/terraform-provider-tfstate_${TRAVIS_TAG}_x4 + +.PHONY: build test testacc vet fmt fmtcheck errcheck vendor-status test-compile targets $(TARGETS)