Skip to content

ref(build): release Docker image to GHCR via Craft#521

Merged
markstory merged 5 commits intogetsentry:mainfrom
aldy505:build/release-ghcr-via-craft
Mar 18, 2026
Merged

ref(build): release Docker image to GHCR via Craft#521
markstory merged 5 commits intogetsentry:mainfrom
aldy505:build/release-ghcr-via-craft

Conversation

@aldy505
Copy link
Collaborator

@aldy505 aldy505 commented Dec 25, 2025

This is an ongoing effort to simplify the release process to not rely on the hacky GitHub Actions script that copies the Docker image after a release was created.

Part of getsentry/self-hosted#4123

REF SELF-78

Comment on lines +16 to +17
echo "Current version: ${OLD_VERSION}"
echo "Bumping version: ${NEW_VERSION}" No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does craft read the output of this script?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. Craft only need this script to run, so the changelog will be properly generated.

@aldy505 aldy505 requested a review from a team as a code owner February 1, 2026 04:36
@markstory
Copy link
Member

Looks good, but there is an image build permission issue.

Comment on lines +7 to +17
exit 1
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR/..

OLD_VERSION="${1}"
NEW_VERSION="${2}"

echo "Current version: ${OLD_VERSION}"
echo "Bumping version: ${NEW_VERSION}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The bump-version.sh script is a no-op and does not update the project version. This will cause the Craft release process to fail because there are no changes to commit.
Severity: HIGH

Suggested Fix

Modify bump-version.sh to update the version string in Cargo.toml and any other relevant files. For example, use a command-line tool like sed to find and replace the old version string with the new one provided to the script.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: scripts/bump-version.sh#L1-L17

Potential issue: The `bump-version.sh` script is intended for use by the Craft release
tool to automate version bumping. However, the script is currently a no-op; it only
prints the old and new versions without modifying any files. The Craft release process
requires this script to update the version in project files, such as `Cargo.toml`.
Because no files are changed, the subsequent step in the release workflow, which commits
the version bump, will fail as there are no changes to commit. This will block the
entire automated release process.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BYK can you remind me again, do we need this bump-version script?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aldy505 yes, unless you explicitly disable it in craft.yml

@aldy505
Copy link
Collaborator Author

aldy505 commented Mar 14, 2026

@markstory when you're back, feel free to merge this :)

@markstory markstory merged commit cc61fa2 into getsentry:main Mar 18, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants