Skip to content

Commit c86f7d7

Browse files
Fix release script sed compatibility for macOS
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6765c2c commit c86f7d7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ if [ "$DRY_RUN" = true ]; then
147147
RELEASE_NOTES=$(sed -n '/^## \[Unreleased\]/,/^## \[/{/^## \[/d;p;}' "$CHANGELOG")
148148
fi
149149

150-
# Trim leading/trailing whitespace
151-
RELEASE_NOTES=$(echo "$RELEASE_NOTES" | sed -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba}')
150+
# Trim leading/trailing whitespace (using perl for macOS compatibility)
151+
RELEASE_NOTES=$(echo "$RELEASE_NOTES" | perl -0777 -pe 's/^\s+//; s/\s+$//')
152152

153153
if [ -z "$RELEASE_NOTES" ]; then
154154
warn "No release notes extracted — the GitHub Release will have minimal content"

0 commit comments

Comments
 (0)