diff --git a/.travis.yml b/.travis.yml index 10101e5..7c98f5c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,3 +25,5 @@ after_success: env: # GITHUB_TOKEN for automatic releases - secure: "at1oJs7ib7glx3W+zk+OkT041LdknVXirIhN403CIihVUrlOhODY7yCTgvF4Rk0jYBJiT35Q2qxpgfWF2qGnsNsQmjG3ydDWQDCepDc/CgXfLyoiSTJK5vTK72dYWTVsBTycXbj1CbSy2X2ah/KWjc4RcgZ67ER7mDpRU5nFeow=" + # Set this to the Go version to use for releases (must appear in version list above). + - RELEASE_GO_VERSION="1.8" diff --git a/.travis/after_success b/.travis/after_success index 832c748..af2ad0c 100644 --- a/.travis/after_success +++ b/.travis/after_success @@ -11,6 +11,11 @@ if [ -z "$GITHUB_TOKEN" ]; then return 0 fi +if [[ "${TRAVIS_GO_VERSION}." != "${RELEASE_GO_VERSION}."* ]]; then + echo "Travis Go version ($TRAVIS_GO_VERSION) is not the releasing version ($RELEASE_GO_VERSION), not releasing." + return 0 +fi + # Make archives. echo Archiving releases... SRC_DIR="$(pwd)"