[chore] correctly escape . characters during release preparation #34193
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.
Description
This PR fixes an issue where the
.
character in a version string (e.g.1.2.3
) was interpreted bysed
as any character and therefore needed to be properly escaped. This happened during the prepare-release workflow.The version string for the current stable and current beta version strings provided at pipeline start is replaced as follows:
This ensures that
sed
searches for the literal.
character instead of interpreting it as a wildcard character.I specifically used the
[]
syntax to avoid the hassle of "how many backslashes do i need until it's properly escaped?". (and that for bash and sed, which work different on different OSes anyways which makes it hard to test as well)Link to tracking issue
Fixes #23981
Notes
This PR uses the same solution as done in open-telemetry/opentelemetry-collector#10631 to fix the same issue in that repo.