Skip to content

Commit 78318ae

Browse files
authored
Merge pull request #2155 from tannewt/ignore_existing_files
When uploading release assets, ignore those already uploaded.
2 parents 157429f + 54b03a7 commit 78318ae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/upload_release_files.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
with open(full_filename, "rb") as f:
2626
response = github.post(url, data=f, headers=headers)
2727
if not response.ok:
28+
if response.status_code == 422 and response.json().get("errors", [{"code":""}])[0]["code"] == "already_exists":
29+
print("File already uploaded. Skipping.")
30+
continue
2831
print("Upload of {} failed with {}.".format(filename, response.status_code))
2932
print(response.text)
3033
sys.exit(response.status_code)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy