6

I'm using Travis-CI to build my Go project and so far I used the gimme script with combination of travis go environment to cross-compile the project.

I switch to Go 1.5 that supports the GOOS and GOARCH environment variables to cross compiler without the need of other compilers or scripts.

My problems is that I'm using Bintray deploy and my environment variables are not exposed in the deploy phase.

language: go

go:
  - 1.5

env:
    matrix:
       - GOOS=windows GOARCH=amd64
       - GOOS=linux GOARCH=amd64
       - GOOS=linux GOARCH=386
       - GOOS=darwin GOARCH=amd64
before_script:
  - go get -d -v ./...

script:
  - go build -v ./...

before_deploy:
  - chmod +x ./prepare_bintray_deployment.sh
  - "./prepare_bintray_deployment.sh"

deploy:
  file: bintray_descriptors/${GOOS}_${GOARCH}.json
  provider: bintray

Note that before this change I was using the GIMME_OS and GIMME_ARCH environment variables and it worked fine and this makes me believe that Travis does support this.

What could be the problem?

4

1 に答える 1