Skip to content

Commit

Permalink
Ensure that the IMAGE_GIT_TAG has 8 chars at commit id (#242)
Browse files Browse the repository at this point in the history
Depending on git version the `git describe --tags` has different commit id size
to ensure that is always the same we can specify `--abbrev=8` to ensure that
it uses 8 chars.

Signed-off-by: Quique Llorente <[email protected]>
  • Loading branch information
qinqon authored Aug 27, 2020
1 parent c64478d commit 7600ea1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
REGISTRY ?= quay.io
REPO ?= kubevirt
IMAGE_TAG ?= latest
IMAGE_GIT_TAG ?= $(shell git describe --abbrev=8 --tags)
IMG ?= $(REPO)/kubemacpool

BIN_DIR = $(CURDIR)/build/_output/bin/
Expand Down Expand Up @@ -96,8 +97,8 @@ container: manager
# Push the docker image
docker-push:
docker push ${REGISTRY}/${IMG}:${IMAGE_TAG}
docker tag ${REGISTRY}/${IMG}:${IMAGE_TAG} ${REGISTRY}/${IMG}:$(shell git describe --tags)
docker push ${REGISTRY}/${IMG}:$(shell git describe --tags)
docker tag ${REGISTRY}/${IMG}:${IMAGE_TAG} ${REGISTRY}/${IMG}:${IMAGE_GIT_TAG}
docker push ${REGISTRY}/${IMG}:${IMAGE_GIT_TAG}

cluster-up:
./cluster/up.sh
Expand Down

0 comments on commit 7600ea1

Please sign in to comment.