language: go

sudo: required

services:
  - docker

go:
- '1.7'

cache:
  directories:
    - vendor

install:
  - go get github.com/mitchellh/gox
  - go get github.com/Masterminds/glide
  - glide install

script:
  - go test $(glide novendor)

after_success:
  - gox
        -osarch "linux/386 linux/amd64 darwin/amd64 windows/amd64"
        -output="dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
  - docker run --rm -v $(pwd):/go/src/github.com/itzg/haproxy-gen
      -w /go/src/github.com/itzg/haproxy-gen
      itzg/go-alpine-build:1.7 dist/haproxy-gen_alpine

deploy:
  provider: releases
  api_key: "${GITHUB_API_KEY}"
  file:
    - dist/haproxy-gen_alpine
    - dist/haproxy-gen_linux_amd64
    - dist/haproxy-gen_windows_amd64
  skip_cleanup: true
  on:
    tags: true

language: go

sudo: required

services:
  - docker

go:
- '1.7'

cache:
  directories:
    - vendor

install:
  - go get github.com/mitchellh/gox
  - go get github.com/Masterminds/glide
  - glide install

script:
  - go test $(glide novendor)

after_success:
  - gox
        -osarch "linux/386 linux/amd64 darwin/amd64 windows/amd64"
        -output="dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
  - docker run --rm -v $(pwd):/go/src/github.com/itzg/haproxy-gen
      -w /go/src/github.com/itzg/haproxy-gen
      itzg/go-alpine-build:1.7 dist/haproxy-gen_alpine
  - chmod a+r dist/*
  - ls -l dist

deploy:
  provider: releases
  api_key: "${GITHUB_API_KEY}"
  file:
    - dist/haproxy-gen_alpine
    - dist/haproxy-gen_linux_amd64
    - dist/haproxy-gen_windows_amd64
  skip_cleanup: true
  on:
    tags: true

Enable read access of alpine binary
Enable read access of alpine binary

