Last active
April 19, 2018 09:04
-
-
Save manabusakai/162ecc0379840510bf68f005a54cf3e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 0.2 | |
env: | |
variables: | |
GO_VERSION: 1.9.2 | |
SRC_DIR: src/github.com/manabusakai/aws-billing | |
phases: | |
install: | |
commands: | |
# Install Golang | |
- curl -sSL -o /tmp/go.tar.gz https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz | |
- tar -C /usr/local -xzf /tmp/go.tar.gz | |
- export GOPATH=${HOME}/go && echo ${GOPATH} | |
- export PATH=/usr/local/go/bin:${GOPATH}/bin:${PATH} && echo ${PATH} | |
- type go && go version | |
# Install dep tool | |
- go get -u github.com/golang/dep/cmd/dep | |
- type dep && dep version | |
pre_build: | |
commands: | |
- mkdir -p ${GOPATH}/${SRC_DIR} && cd ${GOPATH}/${SRC_DIR} | |
- mv ${CODEBUILD_SRC_DIR}/* ${CODEBUILD_SRC_DIR}/.??* . | |
- dep ensure | |
build: | |
commands: | |
- GOOS=linux GOARCH=amd64 go build -o bin/linux-amd64/aws-billing aws-billing.go | |
- GOOS=darwin GOARCH=amd64 go build -o bin/darwin-amd64/aws-billing aws-billing.go | |
artifacts: | |
files: | |
- bin/**/* | |
base-directory: ${GOPATH}/${SRC_DIR} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment