3 Commits

Author SHA1 Message Date
0242b4f541 Use same version of pypa/gh-action-pypi-publish as was used to upload v0.1.0
Some checks failed
Python package / lint (push) Successful in -18s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Successful in -16s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Failing after -23s
2024-12-08 13:44:02 -07:00
0954c2322a Merge branch 'truncation'
Some checks failed
Python package / lint (push) Successful in -17s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Successful in -16s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Failing after -21s
Fixes #1
2024-12-08 13:26:59 -07:00
8c1e9751af Fix truncation warning 2024-12-08 13:26:25 -07:00
2 changed files with 4 additions and 5 deletions

View File

@ -55,7 +55,7 @@ jobs:
name: python-package-distributions name: python-package-distributions
path: dist/ path: dist/
- name: Publish distribution 📦 to PyPI - name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1 uses: pypa/gh-action-pypi-publish@release/v1.10.1
with: with:
password: ${{ secrets.PYPI_API_TOKEN }} password: ${{ secrets.PYPI_API_TOKEN }}

View File

@ -98,13 +98,12 @@ def wrap(command: List[str], config: Path, retries: int, version: bool, dry_run:
MAX_LINES = 20 MAX_LINES = 20
lines = stdout.splitlines() lines = stdout.splitlines()
truncated = False
if len(lines) > MAX_LINES: if len(lines) > MAX_LINES:
truncated = True
lines = lines[-MAX_LINES:] lines = lines[-MAX_LINES:]
message = ( message = (
"Command:\n" "Command:\n" + " ".join(command) + f'\n\nResult{ " (truncated)" if truncated else ""}:\n' + "\n".join(lines)
+ " ".join(command)
+ f'\n\nResult{ " (truncated)" if len(lines) > MAX_LINES else ""}:\n'
+ "\n".join(lines)
) )
if not dry_run: if not dry_run: