From 68e6dbbcb759e28b9277cfcbe620bf2f25ab0d0c Mon Sep 17 00:00:00 2001 From: Edward Muller Date: Sun, 13 Oct 2019 17:25:32 -0700 Subject: [PATCH] Exclude go1.13.x from modules off, only build all on go1.13 modules on --- .travis.yml | 4 ++++ travis/cross_build.sh | 2 +- travis/install.sh | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8e24070..8bfc4f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,10 @@ env: - GO111MODULE=off go: [1.11.x, 1.12.x, 1.13.x] os: [linux, osx] +matrix: + exclude: + - go: 1.13.x + env: GO111MODULE=off ## Modules are the default now. install: - ./travis/install.sh script: diff --git a/travis/cross_build.sh b/travis/cross_build.sh index 824b4ee..5254435 100755 --- a/travis/cross_build.sh +++ b/travis/cross_build.sh @@ -1,5 +1,5 @@ #!/bin/bash -if [[ "$TRAVIS_GO_VERSION" =~ ^1\.12\. ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then +if [[ "$TRAVIS_GO_VERSION" =~ ^1\.13\. ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$GO111MODULE" == "on" ]]; then $(go env GOPATH)/bin/gox -build-lib fi diff --git a/travis/install.sh b/travis/install.sh index 70aa0a4..127ac8b 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -2,7 +2,8 @@ set -e -if [[ "$TRAVIS_GO_VERSION" =~ ^1\.12\. ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then +# Only do this for go1.12 when modules are on so that it doesn't need to be done when modules are off as well. +if [[ "$TRAVIS_GO_VERSION" =~ ^1\.13\. ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$GO111MODULE" == "on" ]]; then GO111MODULE=off go get github.com/dgsb/gox fi @@ -11,5 +12,6 @@ if [[ "$GO111MODULE" == "on" ]]; then fi if [[ "$GO111MODULE" == "off" ]]; then - go get github.com/stretchr/testify/assert golang.org/x/sys/unix github.com/konsorten/go-windows-terminal-sequences + # Should contain all regular (not indirect) modules from go.mod + go get github.com/stretchr/testify golang.org/x/sys/unix github.com/konsorten/go-windows-terminal-sequences fi