Travis CI + Go:无法建立

时间:2016-05-13 20:30:07

标签: go compilation travis-ci

我的.travis.yml是:

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

it failed出现此错误:

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.

我有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

1 个答案:

答案 0 :(得分:1)

查看https://github.com/weldpua2008/deployer,它的根目录下有一个deployer目录。当您发出go build example/myproduct/deployer/deployer.go时,它会尝试创建一个名为deployer的文件,但由于该目录已存在而失败。