-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[chore] correctly escape . characters during release preparation #10631
[chore] correctly escape . characters during release preparation #10631
Conversation
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10631 +/- ##
==========================================
- Coverage 92.36% 92.30% -0.07%
==========================================
Files 386 397 +11
Lines 18400 18705 +305
==========================================
+ Hits 16995 17265 +270
- Misses 1052 1080 +28
- Partials 353 360 +7 ☔ View full report in Codecov by Sentry. |
Can we get the results of a test run of this script before merging it? |
Here is the output from my test VM Some notes:
Here is the console output: Console Output
|
Awesome, thanks!! I think this should be safe to merge then |
cool! thx for merging! |
) #### Description This PR fixes an issue where the `.` character in a version string (e.g. `1.2.3`) was interpreted by `sed` 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: ``` 1.2.3 -> 1[.]2[.]3 ``` 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. Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
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 #9748