File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,10 +10,36 @@ help: ## Ask for help!
1010install : # # Install dependencies
1111 uv sync
1212
13+ VERSION := $(shell python -c \
14+ "import tomllib; \
15+ print(tomllib.load(open('pyproject.toml', 'rb') )['project']['version'])")
16+
1317.PHONY : build
14- build : # # Build the package
18+ build : clean-dist # # Build the package
1519 uv build
1620
21+ .PHONY : publish-dry-run
22+ publish-dry-run : build # # Dry-run: show what would be published
23+ @echo " Would publish leakix v$( VERSION) "
24+ @echo " Would create tag: v$( VERSION) "
25+ @echo " Would create GitHub release: v$( VERSION) "
26+ @echo " Package contents:"
27+ @ls -lh dist/
28+ uv publish --dry-run
29+
30+ .PHONY : publish
31+ publish : build # # Publish to PyPI, tag and create GitHub release
32+ uv publish
33+ git tag -a " v$( VERSION) " -m " Release v$( VERSION) "
34+ git push origin " v$( VERSION) "
35+ gh release create " v$( VERSION) " dist/* \
36+ --title " v$( VERSION) " \
37+ --notes " Release v$( VERSION) "
38+
39+ .PHONY : clean-dist
40+ clean-dist : # # Clean distribution artifacts
41+ rm -rf dist/
42+
1743.PHONY : test
1844test : # # Run tests
1945 uv run pytest
You can’t perform that action at this time.
0 commit comments