From 7f2e9d9a6b3fd48d9fe36f69dab11ac5ff394bb8 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Mon, 28 Mar 2016 12:36:52 +0200 Subject: [PATCH] Require go v1.5 for compilation Google cloud package requires go v1.5 to compile, so we need to require the same for rclone. Fixes #408 --- .travis.yml | 5 ++--- Makefile | 4 ++-- docs/content/install.md | 10 +++++----- versioncheck.go | 6 ++++++ 4 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 versioncheck.go diff --git a/.travis.yml b/.travis.yml index d2bf99a14..fc3836fdc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,16 +7,15 @@ os: # - osx go: - - 1.4.2 - 1.5.3 - 1.6 - tip install: - go get -t ./... - - '[[ `go version` =~ go1.[0-4][^0-9] ]] || go get -u github.com/kisielk/errcheck' + - go get -u github.com/kisielk/errcheck - go get -u golang.org/x/tools/cmd/goimports - - '[[ `go version` =~ go1.[0-4][^0-9] ]] || go get -u github.com/golang/lint/golint' + - go get -u github.com/golang/lint/golint script: - make check diff --git a/Makefile b/Makefile index 7c946e27b..402ce0257 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,9 @@ test: rclone check: rclone go vet ./... - [[ `go version` =~ go1.[0-4][^0-9] ]] || errcheck ./... + errcheck ./... goimports -d . | grep . ; test $$? -eq 1 - [[ `go version` =~ go1.[0-4][^0-9] ]] || { golint ./... | grep -E -v '(StorageUrl|CdnUrl)' ; test $$? -eq 1;} + golint ./... | grep -E -v '(StorageUrl|CdnUrl)' ; test $$? -eq 1 doc: rclone.1 MANUAL.html MANUAL.txt diff --git a/docs/content/install.md b/docs/content/install.md index 9a3b02994..d4438be05 100644 --- a/docs/content/install.md +++ b/docs/content/install.md @@ -1,8 +1,8 @@ --- title: "Install" description: "Rclone Installation" -date: "2015-06-12" ---- +date: "2016-03-28" +------------------ Install ------- @@ -11,15 +11,15 @@ Rclone is a Go program and comes as a single binary file. [Download](/downloads/) the relevant binary. -Or alternatively if you have Go installed use +Or alternatively if you have Go 1.5+ installed use go get github.com/ncw/rclone and this will build the binary in `$GOPATH/bin`. If you have built rclone before then you will want to update its dependencies first with -this (remove `-f` if using go < 1.4) +this - go get -u -v -f github.com/ncw/rclone/... + go get -u -v github.com/ncw/rclone/... See the [Usage section](/docs/) of the docs for how to use rclone, or run `rclone -h`. diff --git a/versioncheck.go b/versioncheck.go new file mode 100644 index 000000000..fb4a4284f --- /dev/null +++ b/versioncheck.go @@ -0,0 +1,6 @@ +//+build !go1.5 + +package main + +// Upgrade to Go version 1.5 to compile rclone. +func init() { Go_version_1_5_required_for_compilation() }