# See https://robots.thoughtbot.com/configure-circleci-for-go
machine:
  environment:
    IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"

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

  override:
    - mkdir -p "$GOPATH/src/$IMPORT_PATH"
    - rsync -azC --delete ./ "$GOPATH/src/$IMPORT_PATH/"

test:
  pre:
    - bin/vet

  override:
    - godep go test ./...

# See https://robots.thoughtbot.com/configure-circleci-for-go
machine:
  environment:
    IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
    MYGOPATH: "$(echo $GOPATH | cut -d : -f 1)"

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

  override:
    - mkdir -p "$MYGOPATH/src/$IMPORT_PATH"
    - rsync -azC --delete ./ "$MYGOPATH/src/$IMPORT_PATH/"

test:
  pre:
    - bin/vet

  override:
    - godep go test ./...

Handle multiple entries in GOPATH
Handle multiple entries in GOPATH

Circle's $GOPATH includes two paths for new projects. Split on `:` and
use the first for our copy of the source code into the $GOPATH.
