Skip to content

Commit

Permalink
Only read go version from .go-version file (#5367)
Browse files Browse the repository at this point in the history
Remove default golang version as not needed anymore. All repos / branches have now a .go-version file.
  • Loading branch information
ruflin authored and tsg committed Oct 10, 2017
1 parent 54a4481 commit 1a98c80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
6 changes: 1 addition & 5 deletions dev-tools/common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ jenkins_setup() {
# Setup Go.
export GOPATH=${WORKSPACE}
export PATH=${GOPATH}/bin:${PATH}
if [ -f ".go-version" ]; then
eval "$(gvm $(cat .go-version))"
else
eval "$(gvm 1.7.5)"
fi
eval "$(gvm $(cat .go-version))"

# Workaround for Python virtualenv path being too long.
export TEMP_PYTHON_ENV=$(mktemp -d)
Expand Down
8 changes: 2 additions & 6 deletions dev-tools/jenkins_ci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ function Exec
# Setup Go.
$env:GOPATH = $env:WORKSPACE
$env:PATH = "$env:GOPATH\bin;C:\tools\mingw64\bin;$env:PATH"
if (Test-Path -PathType leaf .go-version) {
& gvm --format=powershell $(Get-Content .go-version) | Invoke-Expression
} else {
& gvm --format=powershell 1.7.5 | Invoke-Expression
}
& gvm --format=powershell $(Get-Content .go-version) | Invoke-Expression

if (Test-Path "$env:beat") {
cd "$env:beat"
Expand Down Expand Up @@ -58,4 +54,4 @@ echo "System testing $env:beat"
exec { go get github.com/docker/libcompose }
exec { go test -race -c -cover -covermode=atomic -coverpkg ./... }
exec { cd tests/system }
exec { nosetests --with-timer --with-xunit --xunit-file=../../build/TEST-system.xml } "System test FAILURE"
exec { nosetests --with-timer --with-xunit --xunit-file=../../build/TEST-system.xml } "System test FAILURE"

0 comments on commit 1a98c80

Please sign in to comment.