From bcf7981314df81ef217c998c495586a3336d45ec Mon Sep 17 00:00:00 2001 From: Travis Vasceannie Date: Sat, 22 Nov 2025 05:12:00 +0000 Subject: [PATCH] Add release-private make target --- Makefile | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6537c30..ef2d88b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help install install-dev test test-cov lint format typecheck clean build publish precommit analyze +.PHONY: help install install-dev test test-cov lint format typecheck clean build publish precommit analyze release-private SHELL := /bin/bash VENV := .venv @@ -68,6 +68,27 @@ analyze: ## Run full code quality analysis @echo "Running full code quality analysis..." @source $(VENV)/bin/activate && claude-quality full-analysis src/ --format console +release-private: ## VERSION=1.2.3 -> bump pyproject version, build, upload to private PyPI +ifndef VERSION + $(error VERSION is required, e.g., make release-private VERSION=1.2.3) +endif + @echo "Bumping version to $(VERSION) in pyproject.toml..." + @python - <<'PY' +from pathlib import Path +import tomllib +import tomli_w + +pyproject_path = Path("pyproject.toml") +data = tomllib.loads(pyproject_path.read_text()) +data["project"]["version"] = "$(VERSION)" +pyproject_path.write_text(tomli_w.dumps(data), encoding="utf-8") +print(f"pyproject.toml version set to {data['project']['version']}") +PY + @echo "Building distribution packages..." + @source $(VENV)/bin/activate && python -m build + @echo "Uploading to private PyPI (gitea)..." + @source $(VENV)/bin/activate && python -m twine upload -r gitea dist/* + venv: ## Create virtual environment @echo "Creating virtual environment..." @python3.12 -m venv $(VENV)