machine:
  python:
    version: 2.7.3
  services:
    - docker

dependencies:
  pre:
    - git clone -b v0.23.4 https://github.com/libgit2/libgit2.git --single-branch
    - cd libgit2/ && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local && sudo cmake --build . --target install
    - go get -t -d -v ./...
    - go build -v

test:
  override:
    - go test -v -race ./...

deployment:
  prod:
    branch: master
    commands:
      - rm -R libgit2/build/
      - docker build --rm=false -t gamebuildr/gogeta .
      - docker tag gamebuildr/gogeta gcr.io/gamebuildr-151415/gamebuildr-gogeta
      - sudo /opt/google-cloud-sdk/bin/gcloud docker push gcr.io/gamebuildr-151415/gamebuildr-gogeta

machine:
  python:
    version: 2.7.3
  services:
    - docker

dependencies:
  pre:
    - git clone -b v0.23.4 https://github.com/libgit2/libgit2.git --single-branch
    - cd libgit2/ && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local && sudo cmake --build . --target install
    - go get -t -d -v ./...
    - go build -v

test:
  override:
    - go test -v -race ./...

deployment:
  prod:
    branch: master
    commands:
      - sudo rm -R libgit2/build/
      - docker build --rm=false -t gamebuildr/gogeta .
      - docker tag gamebuildr/gogeta gcr.io/gamebuildr-151415/gamebuildr-gogeta
      - sudo /opt/google-cloud-sdk/bin/gcloud docker push gcr.io/gamebuildr-151415/gamebuildr-gogeta

Add sudo to rm command
Add sudo to rm command
