chore: fix bump-version.sh matching spaces in sentry.h#1431
Merged
JoshuaMoelans merged 3 commits intomasterfrom Oct 29, 2025
Merged
chore: fix bump-version.sh matching spaces in sentry.h#1431JoshuaMoelans merged 3 commits intomasterfrom
JoshuaMoelans merged 3 commits intomasterfrom
Conversation
85b968e to
b5a9baf
Compare
5 tasks
mujacica
approved these changes
Oct 28, 2025
supervacuus
reviewed
Oct 28, 2025
scripts/bump-version.sh
Outdated
| echo "Bumping version: ${NEW_VERSION}" | ||
|
|
||
| perl -pi -e "s/^#define SENTRY_SDK_VERSION.*/#define SENTRY_SDK_VERSION \"${NEW_VERSION}\"/" include/sentry.h | ||
| perl -pi -e "s/^# define SENTRY_SDK_VERSION.*/# define SENTRY_SDK_VERSION \"${NEW_VERSION}\"/" include/sentry.h |
Collaborator
There was a problem hiding this comment.
You could also make the regex independent of the clang-format indent by capturing the spaces between # and define, then using them in the output string... something like
Suggested change
| perl -pi -e "s/^# define SENTRY_SDK_VERSION.*/# define SENTRY_SDK_VERSION \"${NEW_VERSION}\"/" include/sentry.h | |
| perl -pi -e "s/^(#\s*)define SENTRY_SDK_VERSION.*/${1}define SENTRY_SDK_VERSION \"${NEW_VERSION}\"/" include/sentry.h |
Member
Author
There was a problem hiding this comment.
good call, I adapted the suggestion in 9d8180d & tested it locally 👌
supervacuus
approved these changes
Oct 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixing the release workflow as became apparent in getsentry/publish#6522 (comment)
Spaces were introduced in https://github.com/getsentry/sentry-native/pull/1417/files#diff-9c77242571e813d699b88663fdc7d7ad7bb5b481a3c1af8d34e1a9e242cbf076R82
#skip-changelog