Skip to content

Commit 889bf59

Browse files
committed
Merge branch 'jdorn/simulate-skip-existing' into 'main'
Simulate --skip-existing for local upload See merge request rewriting/ddisasm!1246
2 parents bd4f94c + 80080ee commit 889bf59

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.ci/gitlab-ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,12 @@ python-manylinux-2010-publish-internal:
272272
python3 delete_remote_packages.py $GL_PKG_API_TOKEN ddisasm-*.whl;
273273
fi
274274
- twine check ddisasm-*.whl
275-
- twine upload --verbose --repository repypi ddisasm-*.whl --skip-existing
275+
# twine --skip-existing only works on PyPI. Simulate it here.
276+
- if pip3 download --no-deps --index-url=$EXTRA_INDEX_URL "ddisasm==$NEW_VERSION" >& /dev/null; then
277+
echo "[INFO] Package already exists. Skipping upload.";
278+
else
279+
twine upload --verbose --repository repypi ddisasm-*.whl;
280+
fi
276281

277282
python-manylinux-2010-publish-external:
278283
stage: deploy

0 commit comments

Comments
 (0)