version: 2
jobs:
  build:
    docker:
      - image: circleci/golang:1.8
    working_directory: /go/src/github.com/cxmate/cxmate
    steps:
      - checkout
      - run: go test $(go list ./... | grep -v /vendor/)
      - deploy:
          name: Github Release
          command: |
            go get github.com/mitchellh/gox
            go get github.com/tcnksm/ghr
            gox -ldflags "-X main.Version $BUILD_VERSION -X main.BuildDate $BUILD_DATE" -output "dist/cxmate.{{.OS}}.{{.Arch}}"
            ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` dist/

version: 2
jobs:
  build:
    docker:
      - image: circleci/golang:1.8
    working_directory: /go/src/github.com/cxmate/cxmate
    steps:
      - checkout
      - run: go test $(go list ./... | grep -v /vendor/)
      - deploy:
          name: Github Release
          command: |
            go get github.com/mitchellh/gox
            go get github.com/tcnksm/ghr
            gox -output "dist/cxmate.{{.OS}}.{{.Arch}}"
            ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` dist/

Remove build flags in gox
Remove build flags in gox
