Skip to content
Merged
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -88,6 +89,7 @@ and this project adheres to
[0.1.9]: https://github.com/LeakIX/LeakIXClient-Python/releases/tag/v0.1.9

<!-- Commit links -->
[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
Expand Down Expand Up @@ -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
28 changes: 27 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading