Skip to content

Commit 9af2fff

Browse files
committed
Updated for easier use
1 parent 1d64e0f commit 9af2fff

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

release.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import re
22
import os
33

4-
file_location = "kepconfig/__init__.py"
4+
file_location = "./kepconfig/__init__.py"
55
version_re_string = "([0-9]+)\.([0-9]+)\.([0-9]+(?:[ab][0-9])?)"
66
version_search = re.compile(r'__version__ = "'+ version_re_string + '"')
77
version_check = re.compile(version_re_string)
@@ -45,15 +45,16 @@ def release():
4545
# os.system("rm -rf dist/*") #Linux
4646
os.system("RMDIR /S /Q dist") #Windows
4747
os.system("python3.10 -m build")
48-
ans = input("upload to pip?(Y/n)")
48+
ans = input("Upload to pip?(Y/n)")
4949
if ans.lower() in ("y", "yes"):
50+
ans = input("Push to production?(Y=production pypi/n=test pypi)")
51+
if ans.lower() in ("y", "yes"):
52+
#Production PyPi Server
53+
os.system("python -m twine upload dist/*")
54+
else:
55+
# Test PyPi Server
56+
os.system("python -m twine upload --repository testpypi dist/*")
5057

51-
# Test PyPi Server
52-
os.system("python -m twine upload --repository testpypi dist/*")
53-
54-
#Production PyPi Server
55-
# os.system("python -m twine upload dist/*")
56-
57-
58+
5859
if __name__ == "__main__":
5960
release()

0 commit comments

Comments
 (0)