From fb70ef7b1c214b71bba761a549743ac1dfd46ee2 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 18 Feb 2016 15:58:19 -0800 Subject: [PATCH] build: Default to Golang 1.6 --- .travis.yml | 3 +-- INSTALLGO.md | 10 +++++----- appveyor.yml | 3 +++ buildscripts/checkdeps.sh | 2 +- mc_test.go | 2 +- verify-runtime.go | 4 ++-- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index c92991bc..578a0f02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,7 @@ env: - ARCH=i686 go: -- 1.5.2 -- 1.5.3 +- 1.6 script: - diff -au <(gofmt -d *.go) <(printf "") diff --git a/INSTALLGO.md b/INSTALLGO.md index 0aa9d206..1d7052d9 100644 --- a/INSTALLGO.md +++ b/INSTALLGO.md @@ -7,15 +7,15 @@ This installation guide is based on Ubuntu 14.04+ on x86-64 platform. $ sudo apt-get install git build-essential ``` -##### Install Go 1.5+ +##### Install Go 1.6+ -Download Go 1.5+ from [https://golang.org/dl/](https://golang.org/dl/). +Download Go 1.6+ from [https://golang.org/dl/](https://golang.org/dl/). ```sh -$ wget https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz +$ wget https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz $ mkdir -p ${HOME}/bin/ $ mkdir -p ${HOME}/go/ -$ tar -C ${HOME}/bin/ -xzf go1.5.1.linux-amd64.tar.gz +$ tar -C ${HOME}/bin/ -xzf go1.6.linux-amd64.tar.gz ``` ##### Setup GOROOT and GOPATH @@ -53,7 +53,7 @@ $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/maste $ brew install git python ``` -##### Install Go 1.5+ +##### Install Go 1.6+ Install golang binaries using `brew` diff --git a/appveyor.yml b/appveyor.yml index 17a271e1..0787e592 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,6 +14,9 @@ environment: # scripts that run after cloning repository install: - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% + - rd C:\Go /s /q + - appveyor DownloadFile https://storage.googleapis.com/golang/go1.6.windows-amd64.zip + - 7z x go1.6.windows-amd64.zip -oC:\ >nul - go version - go env - go get -u github.com/golang/lint/golint diff --git a/buildscripts/checkdeps.sh b/buildscripts/checkdeps.sh index 07e765d5..faf11b83 100755 --- a/buildscripts/checkdeps.sh +++ b/buildscripts/checkdeps.sh @@ -21,7 +21,7 @@ _init() { ## Minimum required versions for build dependencies GIT_VERSION="1.0" - GO_VERSION="1.5.1" + GO_VERSION="1.6" OSX_VERSION="10.8" UNAME=$(uname -sm) diff --git a/mc_test.go b/mc_test.go index d0b746d7..6bcef36f 100644 --- a/mc_test.go +++ b/mc_test.go @@ -121,7 +121,7 @@ func (s *TestSuite) TestCommonPrefix(c *C) { } func (s *TestSuite) TestVersions(c *C) { - v1 := newVersion("1.5.1") + v1 := newVersion("1.6") v2 := newVersion("1.5.0") c.Assert(v2.LessThan(v1), Equals, true) c.Assert(v1.LessThan(v2), Equals, false) diff --git a/verify-runtime.go b/verify-runtime.go index c2da1e20..9329b934 100644 --- a/verify-runtime.go +++ b/verify-runtime.go @@ -28,7 +28,7 @@ import ( ) // minGolangRuntimeVersion minimum golang runtime version required for 'mc'. -var minGolangRuntimeVersion = "1.5.1" +var minGolangRuntimeVersion = "1.6" // Following code handles the current Golang release styles. // We might have to update them in future, if golang community @@ -95,7 +95,7 @@ func checkGolangRuntimeVersion() { v2 := newVersion(minGolangRuntimeVersion) if v1.LessThan(v2) { fatalIf(errDummy().Trace(getNormalizedGolangVersion(), minGolangRuntimeVersion), - "Old Golang runtime version ‘"+v1.String()+"’ detected., ‘mc’ requires minimum go1.5.1 or later.") + "Old Golang runtime version ‘"+v1.String()+"’ detected., ‘mc’ requires minimum go1.6 or later.") } }