Update to using go1.9 as the default go version

Get rid of Makefile spaghetti for avoiding vendor directory where
possible in make check.
This commit is contained in:
Nick Craig-Wood 2017-08-29 14:22:07 +01:00
parent 459cf64403
commit 672c410235
2 changed files with 6 additions and 5 deletions

View File

@ -5,8 +5,9 @@ os:
- linux
go:
- 1.6.4
- 1.7.4
- 1.7.6
- 1.8.3
- 1.9
- tip
install:
- git fetch --unshallow --tags
@ -31,12 +32,12 @@ matrix:
- go: tip
include:
- os: osx
go: 1.8.3
go: 1.9
env: GOTAGS=""
deploy:
provider: script
script: make travis_beta
on:
branch: master
go: 1.8.3
go: 1.9
condition: "`uname` == 'Linux'"

View File

@ -4,7 +4,7 @@ LAST_TAG := $(shell git describe --tags --abbrev=0)
NEW_TAG := $(shell echo $(LAST_TAG) | perl -lpe 's/v//; $$_ += 0.01; $$_ = sprintf("v%.2f", $$_)')
GO_VERSION := $(shell go version)
GO_FILES := $(shell go list ./... | grep -v /vendor/ )
GO_LATEST := $(findstring go1.8,$(GO_VERSION))
GO_LATEST := $(findstring go1.9,$(GO_VERSION))
BETA_URL := https://beta.rclone.org/$(TAG)/
# Pass in GOTAGS=xyz on the make command line to set build tags
ifdef GOTAGS
@ -45,7 +45,7 @@ endif
# Do source code quality checks
check: rclone
ifdef GO_LATEST
go tool vet $(BUILDTAGS) -printfuncs Debugf,Infof,Logf,Errorf . 2>&1 | grep -E -v vendor/ ; test $$? -eq 1
go vet $(BUILDTAGS) -printfuncs Debugf,Infof,Logf,Errorf ./...
errcheck $(BUILDTAGS) $(GO_FILES)
find . -name \*.go | grep -v /vendor/ | xargs goimports -d | grep . ; test $$? -eq 1
go list ./... | grep -v /vendor/ | xargs -i golint {} | grep -E -v '(StorageUrl|CdnUrl)' ; test $$? -eq 1