terraform-provider-google/vendor/google.golang.org/appengine/travis_install.sh
Paddy 961c878e0d Switch to using Go modules. (#2679)
Switch to using Go modules.

This migrates our vendor.json to use Go 1.11's modules system, and
replaces the vendor folder with the output of go mod vendor.

The vendored code should remain basically the same; I believe some
tree shaking of packages and support scripts/licenses/READMEs/etc.
happened.

This also fixes Travis and our Makefile to no longer use govendor.
2018-12-20 17:22:22 -08:00

19 lines
590 B
Bash

#!/bin/bash
set -e
if [[ $GO111MODULE == "on" ]]; then
go get .
else
go get -u -v $(go list -f '{{join .Imports "\n"}}{{"\n"}}{{join .TestImports "\n"}}' ./... | sort | uniq | grep -v appengine)
fi
if [[ $GOAPP == "true" ]]; then
mkdir /tmp/sdk
curl -o /tmp/sdk.zip "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.68.zip"
unzip -q /tmp/sdk.zip -d /tmp/sdk
# NOTE: Set the following env vars in the test script:
# export PATH="$PATH:/tmp/sdk/go_appengine"
# export APPENGINE_DEV_APPSERVER=/tmp/sdk/go_appengine/dev_appserver.py
fi