Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Do not depend on npx for check rebuild script #2681

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions build-system/scripts/check_rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading