Add release-private make target
This commit is contained in:
23
Makefile
23
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)
|
||||
|
||||
Reference in New Issue
Block a user