Skip to content

Commit 841430d

Browse files
committed
Add missing commands to Makefile and prepare for release
1 parent 60edfda commit 841430d

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 2.5.9 (TBD)
1+
## 2.5.9 (January 17, 2025)
22

33
- Bug Fixes
44
- Fixed 'index out of range' error when passing no arguments to an argparse-based command function.

Makefile

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ test: ## Test the code with pytest.
1919
@uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests
2020
@uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests_isolated
2121

22+
.PHONY: docs-test
23+
docs-test: ## Test if documentation can be built without warnings or errors
24+
@uv run mkdocs build -s
25+
26+
.PHONY: docs
27+
docs: ## Build and serve the documentation
28+
@uv run mkdocs serve
29+
2230
.PHONY: build
2331
build: clean-build ## Build wheel file
2432
@echo "🚀 Creating wheel file"
@@ -29,23 +37,27 @@ clean-build: ## Clean build artifacts
2937
@echo "🚀 Removing build artifacts"
3038
@uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"
3139

32-
.PHONY: publish
33-
publish: ## Publish a release to PyPI.
34-
@echo "🚀 Publishing: Dry run."
35-
@uvx --from build pyproject-build --installer uv
36-
@echo "🚀 Publishing."
37-
@uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
40+
.PHONY: tag
41+
tag: ## Add a Git tag and push it to origin with syntax: make tag TAG=tag_name
42+
@echo "🚀 Creating git tag: ${TAG}"
43+
@git tag -a ${TAG}
44+
@echo "🚀 Pushing tag to origin: ${TAG}"
45+
@git push origin ${TAG}
3846

39-
.PHONY: build-and-publish
40-
build-and-publish: build publish ## Build and publish.
47+
.PHONY: validate-tag
48+
validate-tag: ## Check to make sure that a tag exists for the current HEAD and it looks like a valid version number
49+
@echo "🚀 Validating version tag"
50+
@uv run inv validatetag
4151

42-
.PHONY: docs-test
43-
docs-test: ## Test if documentation can be built without warnings or errors
44-
@uv run mkdocs build -s
52+
.PHONY: publish-test
53+
publish-test: validatetag build ## Test publishing a release to PyPI.
54+
@echo "🚀 Publishing: Dry run."
55+
@uvx twine upload --repository testpypi dist/*
4556

46-
.PHONY: docs
47-
docs: ## Build and serve the documentation
48-
@uv run mkdocs serve
57+
.PHONY: publish
58+
publish: validatetag build ## Publish a release to PyPI.
59+
@echo "🚀 Publishing."
60+
@uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
4961

5062
.PHONY: help
5163
help:

0 commit comments

Comments
 (0)