Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
WORKDIR: contrib/pyln-testing
- PACKAGE: pyln-proto
WORKDIR: contrib/pyln-proto
- PACKAGE: pyln-grpc-proto
WORKDIR: contrib/pyln-grpc-proto
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -848,13 +848,23 @@ PYLNS=client proto testing
update-versions: update-pyln-versions update-reckless-version update-dot-version # FIXME: update-doc-examples
@uv lock

update-pyln-versions: $(PYLNS:%=update-pyln-version-%)
update-pyln-versions: $(PYLNS:%=update-pyln-version-%) update-pyln-grpc-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.bak 's/^version = .*/version = "$(NEW_VERSION)"/' contrib/pyln-$*/pyproject.toml && rm contrib/pyln-$*/pyproject.toml.bak
@$(SED) -i.bak 's/^__version__ = .*/__version__ = "$(NEW_VERSION)"/' contrib/pyln-$*/pyln/$*/__init__.py && rm contrib/pyln-$*/pyln/$*/__init__.py.bak
@$(SED) -i.bak 's/^version = .*/version = "$(NEW_VERSION)"' contrib/pyln-$*/pyproject.toml && rm contrib/pyln-$*/pyproject.toml.bak
@$(SED) -i.bak 's/^__version__ = .*/__version__ = "$(NEW_VERSION)"' contrib/pyln-$*/pyln/$*/__init__.py && rm contrib/pyln-$*/pyln/$*/__init__.py.bak

# pyln-grpc-proto uses a different directory layout (pyln/grpc/ not
# pyln/grpc-proto/) and publishes versions without the 'v' prefix on
# PyPI, so it needs its own update target.
update-pyln-grpc-version:
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
@GRPC_VERSION=$$(echo "$(NEW_VERSION)" | $(SED) 's/^v//'); \
echo "Updating contrib/pyln-grpc-proto to $$GRPC_VERSION"; \
$(SED) -i.bak 's/^version = .*/version = "'$$GRPC_VERSION'"/' contrib/pyln-grpc-proto/pyproject.toml && rm contrib/pyln-grpc-proto/pyproject.toml.bak; \
$(SED) -i.bak 's/^__version__ = .*/__version__ = "'$$GRPC_VERSION'"/' contrib/pyln-grpc-proto/pyln/grpc/__init__.py && rm contrib/pyln-grpc-proto/pyln/grpc/__init__.py.bak

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

Expand Down
2 changes: 1 addition & 1 deletion contrib/pyln-grpc-proto/pyln/grpc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyln.grpc.primitives_pb2 import * # noqa: F401,F403
from pyln.grpc.node_pb2 import * # noqa: F401,F403
from pyln.grpc.node_pb2_grpc import * # noqa: F401,F403
__version__ = "0.1.1"
__version__ = "25.09"
Loading