From 2fc4a28de8d70058310a6951cd93849c17d50908 Mon Sep 17 00:00:00 2001 From: Juergen Bocklage-Ryannel Date: Fri, 17 Mar 2017 15:33:06 +0100 Subject: ensure the distribution folder is created if not exists and removed if exists. This is for creating a python distribution --- cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cli.py') diff --git a/cli.py b/cli.py index 9c0f4fb..fd0644d 100755 --- a/cli.py +++ b/cli.py @@ -166,7 +166,9 @@ def uninstall(): @cli.command() def upload(): dist = Path('dist') - dist.rmdir_p() + if dist.exists(): + dist.rmdir_p() + dist.makedirs_p() sh('python3 setup.py bdist_wheel') sh('twine upload dist/*') -- cgit v1.2.3