Skip to content

Commit 0487199

Browse files
committed
Print a warning if there's no dists to upload
1 parent e463812 commit 0487199

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

twine-upload.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ then
1616
copied your token properly if such an error occurs.
1717
fi
1818

19+
if [[
20+
! -d dist/ ||
21+
"`ls -l dist/*.tar.gz dist/*.whl`" == "total 0"
22+
]]
23+
then
24+
>&2 echo \
25+
[WARNING]: \
26+
It looks like there is no Python distribution packages to \
27+
publish in the '"dist/"' directory. Please verify that they \
28+
are in place should you face this problem.
29+
fi
30+
1931

2032
TWINE_USERNAME="$INPUT_USER" \
2133
TWINE_PASSWORD="$INPUT_PASSWORD" \

0 commit comments

Comments
 (0)