Skip to content

Commit

Permalink
migrate to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
dharnitski committed Jan 31, 2018
1 parent b878a65 commit 839472a
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,21 @@
version: 0.1

environment_variables:
plaintext:
PACKAGE: "github.com/dharnitski/golang-codebuild"
version: 0.2

phases:
install:
commands:
- echo CODEBUILD_SRC_DIR - $CODEBUILD_SRC_DIR
- echo GOPATH - $GOPATH

- echo Create dir in GOPATH for sources
- mkdir -p ${GOPATH}/src/${PACKAGE}

- echo Copy source files into GOPATH
- echo cp -a ${CODEBUILD_SRC_DIR}/. ${GOPATH}/src/${PACKAGE}
- cp -a ${CODEBUILD_SRC_DIR}/. ${GOPATH}/src/${PACKAGE}

- cd ${GOPATH}/src/${PACKAGE} && go get ./...

- echo GOROOT - $GOROOT
build:
commands:
- echo Build started on `date`
- echo Getting packages
- go get ./...
- echo Compiling the Go code...
- cd ${GOPATH}/src/${PACKAGE} && go build -o ${CODEBUILD_SRC_DIR}/application

- go build hello.go
post_build:
commands:
- echo Build completed on `date`

artifacts:
files:
- application
- hello

0 comments on commit 839472a

Please sign in to comment.