ref(build): release Docker image to GHCR via Craft#521
ref(build): release Docker image to GHCR via Craft#521markstory merged 5 commits intogetsentry:mainfrom
Conversation
scripts/bump-version.sh
Outdated
| echo "Current version: ${OLD_VERSION}" | ||
| echo "Bumping version: ${NEW_VERSION}" No newline at end of file |
There was a problem hiding this comment.
Does craft read the output of this script?
There was a problem hiding this comment.
Nope. Craft only need this script to run, so the changelog will be properly generated.
|
Looks good, but there is an image build permission issue. |
| 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}" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@BYK can you remind me again, do we need this bump-version script?
There was a problem hiding this comment.
@aldy505 yes, unless you explicitly disable it in craft.yml
|
@markstory when you're back, feel free to merge this :) |
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