This commit is contained in:
EillesWan 2023-04-29 17:00:36 +08:00
commit 799b9b664d
2 changed files with 32 additions and 1 deletions

30
clean_update.py Normal file
View File

@ -0,0 +1,30 @@
import shutil
import os
# find the full path of .egg-info folder
egg_info = [i for i in os.listdir() if i.endswith(".egg-info")][0]
print(egg_info)
# remove build, dist, logs, TrimLog.egg-info folders
try:
shutil.rmtree("build")
except FileNotFoundError:
pass
try:
shutil.rmtree("dist")
except FileNotFoundError:
pass
try:
shutil.rmtree(egg_info)
except FileNotFoundError:
pass
try:
shutil.rmtree("logs")
except FileNotFoundError:
pass
print("Cleaned up!")

View File

@ -1,2 +1,3 @@
python setup.py sdist bdist_wheel
python -m twine upload dist/*
python -m twine upload dist/*
python clean_update.py