Check twine uploads for success
Twine occasionally hits 500 errors from pypi but that doesn't necessarily mean that the upload failed. We can check if it succeeded directly by requesting an HTTP HEAD against the resource path. Use the result of this request to determine if we have failed. Change-Id: I1f12c5c7b1bf0f556d10366336a471b81a6cc68c
This commit is contained in:
parent
c3a8952dde
commit
16b12ba5b9
@ -33,4 +33,7 @@ curl --fail -o $FILENAME http://$TARBALL_SITE/$PROJECT/$FILENAME
|
||||
# Make sure we actually got a gzipped file
|
||||
file -b $FILENAME | grep gzip
|
||||
|
||||
twine upload -r pypi $FILENAME
|
||||
# Uploads may claim to fail but actually succeed so we check if we
|
||||
# can download after upload to determine success.
|
||||
twine upload -r pypi $FILENAME || true
|
||||
curl --head --silent --fail "https://pypi.python.org/simple/$PROJECT/$FILENAME" >/dev/null 2>&1
|
||||
|
@ -35,4 +35,7 @@ curl --fail -o $FILENAME http://$TARBALL_SITE/$PROJECT/$FILENAME
|
||||
# Make sure we actually got a wheel
|
||||
file -b $FILENAME | grep -i zip
|
||||
|
||||
twine upload -r pypi $FILENAME
|
||||
# Uploads may claim to fail but actually succeed so we check if we
|
||||
# can download after upload to determine success.
|
||||
twine upload -r pypi $FILENAME || true
|
||||
curl --head --silent --fail "https://pypi.python.org/simple/$PROJECT/$FILENAME" >/dev/null 2>&1
|
||||
|
Loading…
Reference in New Issue
Block a user