From 04871990d34d1584a6b3bd410b3dc5169cf6ba62 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 12 Sep 2019 17:53:53 +0200 Subject: [PATCH] Print a warning if there's no dists to upload --- twine-upload.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/twine-upload.sh b/twine-upload.sh index e230e0a..637cd00 100755 --- a/twine-upload.sh +++ b/twine-upload.sh @@ -16,6 +16,18 @@ then copied your token properly if such an error occurs. fi +if [[ + ! -d dist/ || + "`ls -l dist/*.tar.gz dist/*.whl`" == "total 0" + ]] +then + >&2 echo \ + [WARNING]: \ + It looks like there is no Python distribution packages to \ + publish in the '"dist/"' directory. Please verify that they \ + are in place should you face this problem. +fi + TWINE_USERNAME="$INPUT_USER" \ TWINE_PASSWORD="$INPUT_PASSWORD" \