Skip to content

Commit 4d10da2

Browse files
ShahanaFarooquirustyrussell
authored andcommitted
script: Add update-versions in Makefile again
And fix sed command for Ubuntu. Fixes #8459. Changelog-None.
1 parent 4b64b69 commit 4d10da2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,12 +756,13 @@ clean: obsclean
756756

757757
# See doc/contribute-to-core-lightning/contributor-workflow.md
758758
PYLNS=client proto testing
759+
update-versions: update-pyln-versions update-reckless-version update-dot-version update-doc-examples
759760
update-pyln-versions: $(PYLNS:%=update-pyln-version-%)
760761

761762
update-pyln-version-%:
762763
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
763764
@echo "Updating contrib/pyln-$* to $(NEW_VERSION)"
764-
@sed -i '' 's/^version = .*/version = "$(NEW_VERSION)"/' contrib/pyln-$*/pyproject.toml
765+
@sed -i.bak 's/^version = .*/version = "$(NEW_VERSION)"/' contrib/pyln-$*/pyproject.toml && rm contrib/pyln-$*/pyproject.toml.bak
765766

766767
pyln-release: $(PYLNS:%=pyln-release-%)
767768

@@ -792,7 +793,8 @@ update-lock:
792793

793794
update-reckless-version:
794795
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
795-
@sed -i '' "s/__VERSION__ = '\([.-z]*\)'/__VERSION__ = '$(NEW_VERSION)'/" tools/reckless
796+
@echo "Updating tools/reckless to $(NEW_VERSION)"
797+
@sed -i.bak "s/__VERSION__ = '.*'/__VERSION__ = '$(NEW_VERSION)'/" tools/reckless && rm tools/reckless.bak
796798

797799
update-dot-version:
798800
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi

0 commit comments

Comments
 (0)