fix: Use uv to run twine in build_and_upload.sh script

- Fix twine execution to use 'uv run twine' instead of direct execution
- Update twine installation check to use 'uv pip show' instead of 'command -v'
- Ensure script is executable
This commit is contained in:
2025-08-11 14:51:19 +02:00
parent a60f5274b2
commit c5b69855c2

View File

@@ -19,7 +19,7 @@ if [[ ! -f "pyproject.toml" ]]; then
fi
# Install twine if not already installed
if ! command -v twine &> /dev/null; then
if ! uv pip show twine &> /dev/null; then
echo "Installing twine..."
uv pip install twine
fi
@@ -62,7 +62,7 @@ if [[ ! -f "$HOME/.pypirc" ]]; then
exit 1
fi
# Upload using twine
twine upload --repository gitea dist/*
# Upload using twine via uv
uv run twine upload --repository gitea dist/*
echo "Package uploaded successfully to Gitea!"