language: go
sudo: required

go:
  - 1.7
  - tip

os:
  - linux

install:
  - go get -u .
  - go build -ldflags "-s -w" -a -installsuffix cgo -o bin/todo-app .
  - docker build -t johscheuer/todo-app-web .

services:
  - docker

after_success:
  - if [ "$TRAVIS_BRANCH" == "master" ]; then
    docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
    docker push johscheuer/todo-app-web;
    fi

language: go
sudo: required

go:
  - 1.7
  - tip

os:
  - linux

install:
  - go get -u .
  - go build -ldflags "-s -w" -a -installsuffix cgo -o bin/todo-app .
  - docker build -t johscheuer/todo-app-web .

services:
  - docker

after_success:
  - if [ "$TRAVIS_BRANCH" == "master" ]; then
    docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
    docker push johscheuer/todo-app-web;
    fi

Remove -e flag for Docker
Remove -e flag for Docker
