Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hatch publish exits with zero exit code when artifacts already exist #937

Open
zanieb opened this issue Aug 20, 2023 · 0 comments
Open

hatch publish exits with zero exit code when artifacts already exist #937

zanieb opened this issue Aug 20, 2023 · 0 comments

Comments

@zanieb
Copy link

zanieb commented Aug 20, 2023

My release workflow runs hatch publish

When publishing the release for the 0.0.36 tag, I got the output:

$ hatch publish
dist/ruff_lsp-0.0.35.tar.gz ... already exists
dist/ruff_lsp-0.0.35-py3-none-any.whl ... already exists

Source

This is because we forgot to bump the version of the library when publishing the new release. The release workflow succeeded because hatch publish does not exit with a non-zero exit code. Thus the new release was not uploaded to PyPI but we did not get notified of a failed release workflow.

I expect hatch publish to exit with a non-zero exit code if the artifacts already exist — or for it to include an option to do so. I looked through the docs and couldn't find anything about this. I did find a previous issue at #91 which suggests that this behavior used to be available?

Related: python-poetry/poetry#3304

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant