2019-05-18 11:27:12 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2019-10-25 15:49:48 +03:00
|
|
|
# Install golanci 1.21.0
|
|
|
|
if [[ "$TRAVIS_GO_VERSION" =~ ^1\.13\. ]]; then
|
|
|
|
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.21.0
|
|
|
|
fi
|
|
|
|
|
2019-10-14 03:25:32 +03:00
|
|
|
# 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
|
2019-10-14 03:02:25 +03:00
|
|
|
GO111MODULE=off go get github.com/dgsb/gox
|
2019-05-18 11:27:12 +03:00
|
|
|
fi
|
2019-10-14 02:56:28 +03:00
|
|
|
|
|
|
|
if [[ "$GO111MODULE" == "on" ]]; then
|
|
|
|
go mod download
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "$GO111MODULE" == "off" ]]; then
|
2019-10-14 03:25:32 +03:00
|
|
|
# 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
|
2019-10-14 02:56:28 +03:00
|
|
|
fi
|