Skip to content

Commit

Permalink
fix: Further fixes to release/publish duties
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Apr 26, 2024
1 parent d78cbd3 commit 263580a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions project/duties.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,15 @@ def publish(ctx: Context) -> None:

ctx.run(
twine_upload,
args=[["upload", "-r", "pypi", "dist/*"]],
args=[["upload", "-r", "pypi", "--skip-existing", "dist/*"]],
title="Publish source and wheel distributions to PyPI",
command="twine upload -r pypi dist/*",
command="twine upload -r pypi --skip-existing dist/*",
pty=PTY,
)


@duty{% if not testing %}(post=["docs-deploy", "build", "publish"]){% endif %}
def release(ctx: Context, version: str | None = None) -> None:
@duty{% if not testing %}(post=["build", "publish", "docs-deploy"]){% endif %}
def release(ctx: Context, version: str = "") -> None:
"""Release a new Python package.

Parameters:
Expand All @@ -229,8 +229,6 @@ def release(ctx: Context, version: str | None = None) -> None:
{%- if not testing %}
ctx.run("git push", title="Pushing commits", pty=False)
ctx.run("git push --tags", title="Pushing tags", pty=False)
ctx.run("pyproject-build", title="Building dist/wheel", pty=PTY)
ctx.run("twine upload --skip-existing dist/*", title="Publishing version", pty=PTY)
{%- endif %}


Expand Down

0 comments on commit 263580a

Please sign in to comment.