From 10dd8a83f2daf23f4697be195a2c67f80308a072 Mon Sep 17 00:00:00 2001 From: Rob Konsdorf Date: Mon, 17 Aug 2026 16:59:05 -0400 Subject: [PATCH] docs(scripts): keep the composer portable and its comment repository-neutral The paired test used sed -i, whose in-place flag differs between GNU and BSD sed, so a contributor on macOS could not run it; it now rewrites through a temp file. The namespace comment named this repository's two lines, which read as a tag convention in the contract repositories that carry the same script; it now describes the two shapes generically. Signed-off-by: Rob Konsdorf --- scripts/release-notes.sh | 6 +++--- scripts/release-notes.test.sh | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/release-notes.sh b/scripts/release-notes.sh index c26871ee..90aaaa9c 100755 --- a/scripts/release-notes.sh +++ b/scripts/release-notes.sh @@ -17,9 +17,9 @@ TAG="${1-}" REF="${2-}" [ -n "$TAG" ] || die "no tag given; usage: scripts/release-notes.sh []" -# The tag shape picks the namespace. The 2.x line is tagged bare (2.1.0) and the -# 1.7 maintenance line keeps its v prefix (v1.7.27), so each line resolves its -# previous tag among its own tags and never crosses into the other one. +# The tag shape picks the namespace. A repository may tag bare (2.1.0) or with +# a v prefix (v1.7.27), and a repository that runs both lines resolves each +# tag's previous tag among tags of its own shape, never crossing into the other. case "$TAG" in v[0-9]*) MATCH='v*' EXCLUDE='v*-*' ;; [0-9]*) MATCH='[0-9]*' EXCLUDE='[0-9]*-*' ;; diff --git a/scripts/release-notes.test.sh b/scripts/release-notes.test.sh index a18e515b..ce1adef0 100755 --- a/scripts/release-notes.test.sh +++ b/scripts/release-notes.test.sh @@ -94,7 +94,10 @@ EOF commit "feat: add the builder (#7)" git tag 1.1.0-rc1 -sed -i 's/^## \[1\.1\.0\] - unreleased$/## [1.1.0] - 2026-02-01/' CHANGELOG.md +# A temp-file rewrite rather than sed -i, whose in-place flag differs between +# GNU and BSD sed. +sed 's/^## \[1\.1\.0\] - unreleased$/## [1.1.0] - 2026-02-01/' CHANGELOG.md >CHANGELOG.md.new +mv CHANGELOG.md.new CHANGELOG.md commit "chore(release): 1.1.0" git tag 1.1.0