logrus/travis/install.sh

18 lines
571 B
Bash
Raw Normal View History

#!/bin/bash
set -e
2020-11-06 15:26:15 +03:00
# Install golanci 1.32.2
if [[ "$TRAVIS_GO_VERSION" =~ ^1\.15\. ]]; then
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.32.2
2019-10-25 15:49:48 +03:00
fi
# 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
fi
if [[ "$GO111MODULE" == "on" ]]; then
go mod download
fi