sudo: required

language: go

go:
  - 1.7.x
install:
  - echo "Please don't go get"
  
services:
  - docker

before_script:
- curl -sSL test.docker.com | sudo -E sh

script:
  - go get -d -v
  - ./build.sh
  - ./build_samples.sh
  - ./test/version.sh ./faas-cli
#  - ./deploy_samples.sh # requires a deployed FaaS

sudo: required

language: go

go:
  - 1.7.x
install:
  - echo "Please don't go get"
  
services:
  - docker

before_script:
- curl -sSL test.docker.com | sudo -E sh

script:
  - go get -d -v
  - ./build.sh
  - ./build_samples.sh
  - ./test/version.sh ./faas-cli
#  - ./deploy_samples.sh # requires a deployed FaaS

before_deploy:
  - ./build_redist.sh

deploy:
  provider: releases
  api_key:
      secure: "ADD SECURE TOKEN HERE"
  file: 
  - faas-cli
  - faas-cli-darwin
  - faas-cli-armhf
  - faas-cli.exe
  skip_cleanup: true
  on:
    tags: true
Build and deploy all platforms to Github on tag
Build and deploy all platforms to Github on tag

This commit updates Travis to build `faas-cli` for all target platforms
and deploy the resulting binaries to Github whenever a release is
tagged.

**NOTE** the `api_key` will need to be populated with a travis secure
encrypted copy of a Github token with repo access.

- Create a personal token for the faas-cli deploy with `repo:status`,
`repo_deployment`, `public_repo` scope
- Encrypt that token with the travis cli.
  ```
  cd $GOPATH/src/github.com/alexellis/faas-cli/
  travis login
  travis encrypt YOUR_GITHUB_TOKEN
  ```

Signed-off-by: John McCabe <a51dda7c7ff50b61eaea0444371f4a6a9301e501@johnmccabe.net>
