machine:
  services:
    - docker
  environment:
    IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"

dependencies:
  pre:
    - go get github.com/tools/godep

#test:
#  override:
#    - GOPATH=/home/ubuntu/Tiny-Redirect/src go test -cover

deployment:
  hub:
    branch: master
    commands:
      - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build src/redirect.go
      - docker build --tag=jdavis7257/tiny-redirect:1.0 .
      - docker build --tag=jdavis7257/tiny-redirect:latest .
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - docker push jdavis7257/tiny-redirect:1.0
      - docker push jdavis7257/tiny-redirect:latest

machine:
  services:
    - docker
  environment:
    IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"

dependencies:
  pre:
    - go get github.com/tools/godep

#test:
#  override:
#    - GOPATH=/home/ubuntu/Tiny-Redirect/src go test -cover

deployment:
  hub:
    branch: master
    commands:
      - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build src/redirect.go
#      - docker build --tag=jdavis7257/tiny-redirect:1.0 .
      - docker build --tag=jdavis7257/tiny-redirect:latest .
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
#      - docker push jdavis7257/tiny-redirect:1.0
      - docker push jdavis7257/tiny-redirect:latest

Remove release versions from build push.
Remove release versions from build push.