diff --git a/reweave/tools/build-images.sh b/reweave/tools/build-images.sh index c9304c76..aba12a57 100755 --- a/reweave/tools/build-images.sh +++ b/reweave/tools/build-images.sh @@ -39,7 +39,14 @@ build_image() { IMAGENAME=$2 IMAGETAG=${IMAGENAME}:${IMAGE_VERSION} if [ "$PUBLISH" = "true" ]; then - PUBLISHTAGOPT="-t ${IMAGENAME}:latest" + # When an image is published to a registry, also tag it + # with ':latest', unless the image version string + # contains '-beta' + case "$IMAGE_VERSION" in + *-beta*) IS_BETA=1 ;; + *) IS_BETA= ;; + esac + [ -z "${IS_BETA}" ] && PUBLISHTAGOPT="-t ${IMAGENAME}:latest" else PUBLISHTAGOPT="" fi