Skip to content

Commit

Permalink
Update buildspec.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bvtujo authored May 21, 2020
1 parent 583ffda commit d5a67eb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ phases:
# so we copy all the source code to the appropriate location before
# invoking any go command
- ls -lah
- mkdir -p /go/src/github.com/aws/amazon-ecs-cli
- cp -R . /go/src/github.com/aws/amazon-ecs-cli/
- mkdir -p /go/1.13.8/src/github.com/aws/amazon-ecs-cli
- cp -R . /go/1.13.8/src/github.com/aws/amazon-ecs-cli/
- |
env -i PATH=$PATH GOPATH=`go env GOPATH` GOROOT=`go env GOROOT` GOCACHE=`go env GOCACHE` \
go test -race -v -cover github.com/aws/amazon-ecs-cli/ecs-cli/modules/...
# make a copy of the version.go because `go run gen/version-gen.go` will
# modify it.
- cp /go/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/version.go /go/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/_version.go
- cp /go/1.13.8/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/version.go /go/1.13.8/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/_version.go
# need to cd into the version package because version-gen.go assumes the relative
# location of the VERSION file.
- cd /go/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/
- cd /go/1.13.8/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/
# since we are running the go program inside a Linux container, has to hardcode
# the GOOS and GOARCH correspondinly regardless of what the host OS is.
- GOOS=linux GOARCH=amd64 ECS_RELEASE=cleanbuild go run gen/version-gen.go
Expand All @@ -36,7 +36,7 @@ phases:
- GIT_COMMIT_ID=`git rev-parse HEAD`
- echo "GIT_COMMIT_ID=$GIT_COMMIT_ID"
# TODO: Get rid of the VERSION file after we fully switch to the new CI/CD
- CHECKED_IN_VERSION=`cat /go/src/github.com/aws/amazon-ecs-cli/VERSION`
- CHECKED_IN_VERSION=`cat /go/1.13.8/src/github.com/aws/amazon-ecs-cli/VERSION`
- echo "VERSION_FILE=$CHECKED_IN_VERSION"
- echo "GOPATH=$GOPATH"
- |
Expand All @@ -56,7 +56,7 @@ phases:
post_build:
commands:
# restore the version file
- mv /go/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/_version.go /go/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/version.go
- mv /go/1.13.8/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/_version.go /go/1.13.8/src/github.com/aws/amazon-ecs-cli/ecs-cli/modules/version/version.go
- echo "Creating latest artifacts..."
- cp aws/amazon-ecs-cli/ecs-cli-windows-amd64-$VERSION.exe aws/amazon-ecs-cli/ecs-cli-windows-amd64-latest.exe
- cp aws/amazon-ecs-cli/ecs-cli-linux-amd64-$VERSION aws/amazon-ecs-cli/ecs-cli-linux-amd64-latest
Expand All @@ -70,4 +70,4 @@ phases:
- echo "aws/amazon-ecs-cli/ecs-cli-darwin-amd64-latest" >> $MANIFESTFILE
artifacts:
files:
- '**/*'
- '**/*'

0 comments on commit d5a67eb

Please sign in to comment.