fix(release): remove GNUism#54
Conversation
There was a problem hiding this comment.
Pull request overview
Updates release helper scripts to avoid GNU-specific grep -P/-o usage (which breaks on macOS) by switching YAML field extraction to yq.
Changes:
- Replace
grep -Poparsing ofChart.yamlfields withyqlookups in release note generation and version bump scripts. - Minor formatting/no-op change in
download-chart-docker-images.sh.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| scripts/generate-release-notes.sh | Use yq to read chart name and version instead of GNU grep -P. |
| scripts/bump-chart-version.sh | Use yq to read chart version instead of GNU grep -P. |
| scripts/download-chart-docker-images.sh | Formatting-only change (no functional impact). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pranjalg13
left a comment
There was a problem hiding this comment.
LGTM 👍 , I guess we might need to manually verify this? on both macos and linux 😄
Can you run: It should modify local files and that should work with MacOS now |
|
@pranjalg13 can you run this on mac? |
I rebased with main, still getting this error:
It is not bumping the version automatically cc: @multani @ChrisKujawa |
Actually, it also doesn't work on |
`grep -p` is GNU specific and doesn't work on MacOS
|
@pranjalg13 can you try again from the latest version of this branch with: (I changed the order of the make targets above ⬆️, to bump first, then generate the release notes) |
|
|
||
| # Generate new version based on the old one. | ||
| chart_version_old=$(grep -Po "(?<=^version: ).+" charts/${chart_name}/Chart.yaml) | ||
| chart_version_old=$(yq eval .version charts/${chart_name}/Chart.yaml) |
There was a problem hiding this comment.
I think the problem with this is that we need yq installed 🤔 Not sure whether we can expect this to be the default. Do we have configured/documented as requirement?
There was a problem hiding this comment.
yq is already used in other scripts and installed by the Docker builder too.
I guess it's reasonable to assume releaser would have yq already installed.
I earlier tried that as well but this was the error: I guess it is fine, not a big issue 😄 , I will use GitHub action |
grep -pis GNU specific and doesn't work on MacOSOn MacOS, the following steps are not working due to the
-Poption used in thegrepcommand: