diff --git a/build-system/scripts/check_rebuild b/build-system/scripts/check_rebuild index 6e4e4b3384c5..76f99c6540e2 100755 --- a/build-system/scripts/check_rebuild +++ b/build-system/scripts/check_rebuild @@ -13,14 +13,13 @@ REPOSITORY=$2 [[ "$COMMIT_MESSAGE" == *"[ci rebuild $REPOSITORY]"* ]] && exit 1 [[ "$COMMIT_MESSAGE" == *"[ci rebuild]"* ]] && exit 1 -COMMIT_TAG_VERSION=$(extract_tag_version $REPOSITORY) DOCKERFILE=$(query_manifest dockerfile $REPOSITORY) # If we are deploying, and our Dockerfile uses the COMMIT_TAG arg, we need to rebuild to ensure the latest version # number is baked into the image. # TODO: This should probably be properly handled by e.g. release-please bumping the version number as part of its PR # which would invalidate the content hash, rather than us using Dockerfile ARGS. -if [ -n "$COMMIT_TAG_VERSION" ] && grep -qE "^ARG COMMIT_TAG=" $DOCKERFILE; then +if [ -n "$COMMIT_TAG" ] && grep -qE "^ARG COMMIT_TAG=" $DOCKERFILE; then exit 1 fi