script: Add `update-versions` in Makefile again
What changed, and why it matters
This is a routine build/maintenance patch. It re-adds a Makefile target used by developers to bump version numbers across several files, and changes the sed command to be compatible with Ubuntu (GNU sed). There is no change to the lightning node's runtime code, no user-facing behavior change, and no security relevance.
No security action needed. Treat as normal maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit restores the update-versions phony target in the Makefile and fixes two sed -i invocations. macOS/BSD sed accepts -i '' for in-place editing without backup, while GNU sed on Ubuntu treats -i'' as a literal empty backup suffix and errors. The patch switches to sed -i.bak ... && rm ...bak, which works on both. It also adds an echo statement and broadens the reckless version regex. These are developer tooling fixes only.
Changed components
Makefile (developer release tooling)Inspect captured patch +4 / −2
diff --git a/Makefile b/Makefile
index 3eb6761a..eadb9347 100644
--- a/Makefile
+++ b/Makefile
@@ -756,12 +756,13 @@ clean: obsclean
# See doc/contribute-to-core-lightning/contributor-workflow.md
PYLNS=client proto testing
+update-versions: update-pyln-versions update-reckless-version update-dot-version update-doc-examples
update-pyln-versions: $(PYLNS:%=update-pyln-version-%)
update-pyln-version-%:
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
@echo "Updating contrib/pyln-$* to $(NEW_VERSION)"
- @sed -i '' 's/^version = .*/version = "$(NEW_VERSION)"/' contrib/pyln-$*/pyproject.toml
+ @sed -i.bak 's/^version = .*/version = "$(NEW_VERSION)"/' contrib/pyln-$*/pyproject.toml && rm contrib/pyln-$*/pyproject.toml.bak
pyln-release: $(PYLNS:%=pyln-release-%)
@@ -792,7 +793,8 @@ update-lock:
update-reckless-version:
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
- @sed -i '' "s/__VERSION__ = '\([.-z]*\)'/__VERSION__ = '$(NEW_VERSION)'/" tools/reckless
+ @echo "Updating tools/reckless to $(NEW_VERSION)"
+ @sed -i.bak "s/__VERSION__ = '.*'/__VERSION__ = '$(NEW_VERSION)'/" tools/reckless && rm tools/reckless.bak
update-dot-version:
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.