From 672c4102359e0b36868e466ba99b8356853d41d3 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 29 Aug 2017 14:22:07 +0100 Subject: [PATCH] Update to using go1.9 as the default go version Get rid of Makefile spaghetti for avoiding vendor directory where possible in make check. --- .travis.yml | 7 ++++--- Makefile | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 305ea5bc5..301b6225f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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'" diff --git a/Makefile b/Makefile index f8e5f6c42..90287f50c 100644 --- a/Makefile +++ b/Makefile @@ -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