fix(tag_release): improve macOS and Linux compatibility #335
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.
Fixes two cross-platform compatibility issues in the
tag_release.sh
script:Issues Fixed
1. macOS Version Extraction Issue
Problem: The script was showing errors like:
Root Cause: macOS's default BSD sed doesn't support
\s
regex pattern for whitespace, causing version extraction to fail and return entire lines instead of just version numbers.Fix: Replace
\s
with[[:space:]]
in all regex patterns for cross-platform compatibility.2. Linux jq Syntax Issue
Problem: The script was showing errors like:
Root Cause: Line continuations in jq commands were causing shell parsing issues on some Linux environments.
Fix: Remove backslash line continuations from jq commands and put all arguments on single lines.
Changes Made
\s*
with[[:space:]]*
in grep and sed patternsadd_json_error()
,add_json_warning()
, andadd_json_module()
Testing
✅ Tested on Linux with the current main branch
✅ Tested on the problematic commit
c2bc5cd
where issues occurred✅ Verified version extraction works correctly with various whitespace patterns
✅ Confirmed jq commands execute without syntax errors
The script now correctly detects new modules from merge commits and can release them on both macOS and Linux systems.
@coder/chris-cat Please review when you have a chance!