I'm using Travis CI to automate builds and tests on my Go project.
The ./Godeps/Godeps.json
looks like this :
{
"ImportPath": "github.com/my_project_path",
"GoVersion": "go1.5",
"Packages": [
"./..."
],
"Deps": [
{
"ImportPath": "github.com/Sirupsen/logrus",
"Comment": "v0.8.7-53-g446d1c1",
"Rev": "446d1c146faa8ed3f4218f056fcd165f6bcfda81"
}
]
}
The .travis.yml
file looks like this :
language: go
go:
- 1.3.3
- 1.4.2
- 1.5.1
- release
- tip
before_install:
- go get github.com/my_project_path
- go get github.com/tools/godep
install:
- godep restore
script:
- go test -v ./...
All other builds work except for tip
because of go version
.
The last few lines of the Travis CI log for tip
are :
$ go version
go version devel +e4dcf5c Thu Dec 24 06:55:33 2015 +0000 linux/amd64
go.env
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/travis/gopath"
GORACE=""
GOROOT="/home/travis/.gimme/versions/go"
GOTOOLDIR="/home/travis/.gimme/versions/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
before_install.1
3.52s$ go get github.com/my_project_path
before_install.2
3.34s$ go get github.com/tools/godep
0.02s$ godep restore
godep: Error determing major go version from: "devel"
The command "godep restore" failed and exited with 1 during .
Your build has been stopped.
How can I fix this? Am I just stuck with using go get ./...
?
EDIT: It seems someone made a pull request to fix this.
EDIT2: Seems the pull request was merged. Will test if it's fixed soonish.