Skip to content

Commit

Permalink
Merge pull request #823 from zware/skip-existing_on_gcp
Browse files Browse the repository at this point in the history
Support --skip-existing with GCP Artifact Registry
  • Loading branch information
sigmavirus24 committed Nov 2, 2021
2 parents 658037f + 34cfed4 commit ee97836
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/816.feature.rst
@@ -0,0 +1 @@
Allow the ``--skip-existing`` option to work with GCP Artifact Registry.
4 changes: 2 additions & 2 deletions twine/commands/upload.py
Expand Up @@ -58,8 +58,8 @@ def skip_upload(
return (
# pypiserver (https://pypi.org/project/pypiserver)
status == 409
# PyPI / TestPyPI
or (status == 400 and "already exist" in reason)
# PyPI / TestPyPI / GCP Artifact Registry
or (status == 400 and any("already exist" in x for x in [reason, text]))
# Nexus Repository OSS (https://www.sonatype.com/nexus-repository-oss)
or (status == 400 and any("updating asset" in x for x in [reason, text]))
# Artifactory (https://jfrog.com/artifactory/)
Expand Down

0 comments on commit ee97836

Please sign in to comment.