From 3edfd0a326055f8e95bdf3aadb536ba586c1ecbc Mon Sep 17 00:00:00 2001 From: HJK Date: Mon, 28 Jan 2019 14:25:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=BE=85=E5=8A=A9=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.py b/setup.py index e3ea05b..30269f2 100644 --- a/setup.py +++ b/setup.py @@ -9,8 +9,16 @@ """ import os +import sys import setuptools +# 'setup.py publish' shortcut. +if sys.argv[-1] == 'publish': + os.system('rm -rf dist') + os.system('python setup.py sdist bdist_wheel') + os.system('twine upload dist/*') + sys.exit() + here = os.path.abspath(os.path.dirname(__file__)) about = {} with open(os.path.join(here, 'music_dl', '__version__.py'), 'r', encoding='utf-8') as f: