I think you will be good if you remove the previous version of go first.  
Add these lines to the first commands under INSTALL

- echo "remove previous version of go"
- rm -rf /usr/local/go


On Wednesday, May 10, 2017 at 8:26:28 AM UTC-4, Kareem Hepburn wrote:
>
> Anyone here have a buildspec they can share for CodeBuild with govendor? 
> I'm currently in a loss and can't seem to get my buildspec to work.
>
> Here's my build spec:
>
>
> version: 0.1
> environment_variables:
>   plaintext:
>     APP_NAME: "boomboom"
>     PACKAGE: "github.com/BoomBoom/boomboom"
>     GO_VERSION: "1.8.1"
>     GO: "/usr/local/go/bin/go"
>     WORKDIR: "go"
> phases:
>   install:
>     commands:
>        # Install go and glide, copy source into GOPATH
>       - echo "Path is ${PATH}"
>       - echo "Building source version '${SOURCE_VERSION:-master}'"
>       - curl -S 
> https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz 
> 2>/dev/null | tar -C /usr/local -xzf -
>       - $GO version
>       - export GOPATH="${CODEBUILD_SRC_DIR}/${WORKDIR}"; mkdir -p 
> "${GOPATH}/bin"; mkdir -p "${GOPATH}/src"
>       - export GOPATH="${CODEBUILD_SRC_DIR}/${WORKDIR}"; export 
> PATH="${PATH}:/usr/local/go/bin:${GOPATH}/bin"
>
>   pre_build:
>     commands:
>       # Ensure code passes all lint tests
>       # - golint -set_exit_status
>
>       # Run all tests included with our application
>       # Can't run this for now for some reason, oh well.
>       # - make resetdb
>       # - make test
>
>   build:
>     commands:
>       # Build our application
>       - export GOPATH="${CODEBUILD_SRC_DIR}/${WORKDIR}"; cd 
> "${GOPATH}/src/${PACKAGE}"; $GO build -o app 
> cmd/tapatybe-http-server/tapatybe-http-server.go
> artifacts:
>   files:
>     - app
>     - appspec.yml
>     - aws/config/*
>     - buildspec.yml
>     - resources/*
>     - etc/*
>     - vendor/*
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to