Skip to content

Commit 32ad317

Browse files
committedMar 6, 2019
travis: update for go modules; bump Go versions
1 parent b1899b7 commit 32ad317

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed
 

‎.travis.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
11
language: go
22
go:
3-
- 1.8.x
4-
- 1.9.x
53
- 1.10.x
64
- 1.11.x
5+
- 1.12.x
76
env:
87
- NSQ_DOWNLOAD=nsq-0.3.8.linux-amd64.go1.6.2 GOARCH=amd64
98
- NSQ_DOWNLOAD=nsq-0.3.8.linux-amd64.go1.6.2 GOARCH=386
109
- NSQ_DOWNLOAD=nsq-1.0.0-compat.linux-amd64.go1.8 GOARCH=amd64
1110
- NSQ_DOWNLOAD=nsq-1.0.0-compat.linux-amd64.go1.8 GOARCH=386
1211
- NSQ_DOWNLOAD=nsq-1.1.0.linux-amd64.go1.10.3 GOARCH=amd64
1312
- NSQ_DOWNLOAD=nsq-1.1.0.linux-amd64.go1.10.3 GOARCH=386
14-
install:
15-
- wget -O dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
16-
- chmod +x dep
17-
- ./dep ensure
1813
script:
19-
- wget http://bitly-downloads.s3.amazonaws.com/nsq/$NSQ_DOWNLOAD.tar.gz
20-
- tar zxvf $NSQ_DOWNLOAD.tar.gz
21-
- export PATH=$NSQ_DOWNLOAD/bin:$PATH
22-
- pushd $TRAVIS_BUILD_DIR
23-
- ./test.sh
24-
- popd
14+
- ./travis.sh
2515
notifications:
2616
email: false
2717
sudo: false

‎travis.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
wget http://bitly-downloads.s3.amazonaws.com/nsq/$NSQ_DOWNLOAD.tar.gz
6+
tar zxvf $NSQ_DOWNLOAD.tar.gz
7+
export PATH=$NSQ_DOWNLOAD/bin:$PATH
8+
9+
go_minor_version=$(go version | awk '{print $3}' | awk -F. '{print $2}')
10+
if [[ $go_minor_version -gt 10 ]]; then
11+
export GO111MODULE=on
12+
else
13+
wget -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
14+
chmod +x dep
15+
./dep ensure
16+
fi
17+
18+
./test.sh

0 commit comments

Comments
 (0)
Please sign in to comment.