diff --git a/Makefile b/Makefile index d394d72..6e5496f 100644 --- a/Makefile +++ b/Makefile @@ -33,8 +33,17 @@ clean-build: ## clean build artifacts .PHONY: publish publish: ## publish a release to pypi. @echo "🚀 Publishing: Dry run." - @poetry config pypi-token.pypi $(PYPI_TOKEN) - @poetry publish --dry-run + @echo "🚀 Configuring pypi token." + @PYPI_TOKEN=$$(grep -A 1 pypi ~/.pypirc | tail -n 1 | awk '{print $$3}'); \ + if [ -z "$$PYPI_TOKEN" ]; then \ + echo "🚀 No PYPI_TOKEN found in ~/.pypirc"; \ + exit 1; \ + else \ + echo "🚀 Found PYPI_TOKEN in ~/.pypirc"; \ + fi; \ + poetry config pypi-token.pypi $$PYPI_TOKEN; + @echo "🚀 Publishing dry run." + poetry publish --dry-run @echo "🚀 Publishing." @poetry publish diff --git a/pyproject.toml b/pyproject.toml index ef2f153..9f7eb9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "llm_strategy" -version = "2.1.1" +version = "2.2.0" description = "Directly Connecting Python to LLMs - Dataclasses & Interfaces <-> LLMs" authors = ["Andreas Kirsch, Daedalus Lab Ltd "] repository = "https://github.com/blackhc/llm-strategy"