Skip to content

Commit

Permalink
fix: Do not depend on npx for check rebuild script (#2681)
Browse files Browse the repository at this point in the history
Please provide a paragraph or two giving a summary of the change,
including relevant motivation and context.

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
  • Loading branch information
charlielye authored Oct 4, 2023
1 parent ef499a0 commit 20ffbbc
Showing 1 changed file with 1 addition and 2 deletions.
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

0 comments on commit 20ffbbc

Please sign in to comment.