Skip to content

Commit

Permalink
Merge pull request #49 from LeadingEDJE/Fix-CodeBuild
Browse files Browse the repository at this point in the history
Make codebuild determine tag using git command
  • Loading branch information
andrewdmay authored Dec 23, 2020
2 parents f062deb + 1c20955 commit 884c423
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ phases:
- aws ecr-public get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin public.ecr.aws
build:
commands:
- VERSION=$(basename $CODEBUILD_SOURCE_VERSION)
- VERSION=$(git describe --tags --abbrev=0)
- echo "Version $VERSION"
- docker build --build-arg version=$VERSION -t $IMAGE_REPO_NAME:$VERSION .
post_build:
Expand Down

0 comments on commit 884c423

Please sign in to comment.