Valeriy Solovyov
Valeriy Solovyov

Reputation: 5648

Travis CI + Go: can't build

My .travis.yml is:

language: go
go:
  - 1.5
install:
  - go get github.com/tools/godep
  - godep restore
branches:
  only:
  - master
script:
  - go build  example/myproduct/deployer/deployer.go
notifications:
  email: false

And it failed with this error:

go build  example/myproduct/deployer/deployer.go    
go install command-line-arguments: build output "deployer" already exists and is a directory    
The command "go build  example/myproduct/deployer/deployer.go" exited with 1.    
Done. Your build exited with 1.

I have VagrantFile where it's ok:

go get github.com/tools/godep
cd /opt/gopath/src/github.com/dorzheh/deployer
godep restore
ln -s  /opt/gopath/src/github.com/dorzheh/deployer/example/myproduct/ /home/vagrant/example
cd /home/vagrant/
go build  /home/vagrant/example/deployer/deployer.go

Upvotes: 1

Views: 197

Answers (1)

Frederik Deweerdt
Frederik Deweerdt

Reputation: 5271

Looking at https://github.com/weldpua2008/deployer, it does have a deployer directory at the root. When you issue go build example/myproduct/deployer/deployer.go it tries to create a file called deployer but fails because the directory already exists.

Upvotes: 1

Related Questions