From 87b68f63de67cc3f007c04d43f0bc8682ab19553 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Tue, 17 Mar 2026 13:44:43 +0100 Subject: [PATCH 1/2] Makefile: add publish and publish-dry-run targets --- Makefile | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 43a45eb..29a4cb2 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,36 @@ help: ## Ask for help! install: ## Install dependencies uv sync +VERSION := $(shell python -c \ + "import tomllib; \ + print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") + .PHONY: build -build: ## Build the package +build: clean-dist ## Build the package uv build +.PHONY: publish-dry-run +publish-dry-run: build ## Dry-run: show what would be published + @echo "Would publish leakix v$(VERSION)" + @echo "Would create tag: v$(VERSION)" + @echo "Would create GitHub release: v$(VERSION)" + @echo "Package contents:" + @ls -lh dist/ + uv publish --dry-run + +.PHONY: publish +publish: build ## Publish to PyPI, tag and create GitHub release + uv publish + git tag -a "v$(VERSION)" -m "Release v$(VERSION)" + git push origin "v$(VERSION)" + gh release create "v$(VERSION)" dist/* \ + --title "v$(VERSION)" \ + --notes "Release v$(VERSION)" + +.PHONY: clean-dist +clean-dist: ## Clean distribution artifacts + rm -rf dist/ + .PHONY: test test: ## Run tests uv run pytest From fa955dfd2c32639f20785566f2819c63e6815865 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Tue, 17 Mar 2026 13:47:07 +0100 Subject: [PATCH 2/2] CHANGELOG: add publish and publish-dry-run targets --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a65f155..7b882d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ and this project adheres to - Add mypy type checking to CI workflow ([6b9a3db], [#42]) - Bump astral-sh/setup-uv from 6 to 7 ([cfa8b6c], [#72]) - Migrate from Poetry to uv ([14bc55e], [#65]) +- Makefile: add `publish` and `publish-dry-run` targets ([87b68f6], [#80]) ## [0.1.10] - 2024-12-XX @@ -88,6 +89,7 @@ and this project adheres to [0.1.9]: https://github.com/LeakIX/LeakIXClient-Python/releases/tag/v0.1.9 +[87b68f6]: https://github.com/LeakIX/LeakIXClient-Python/commit/87b68f6 [c62d2a4]: https://github.com/LeakIX/LeakIXClient-Python/commit/c62d2a4 [01b280f]: https://github.com/LeakIX/LeakIXClient-Python/commit/01b280f [aa9cc03]: https://github.com/LeakIX/LeakIXClient-Python/commit/aa9cc03 @@ -119,3 +121,4 @@ and this project adheres to [#75]: https://github.com/LeakIX/LeakIXClient-Python/pull/75 [#76]: https://github.com/LeakIX/LeakIXClient-Python/pull/76 [#78]: https://github.com/LeakIX/LeakIXClient-Python/pull/78 +[#80]: https://github.com/LeakIX/LeakIXClient-Python/pull/80