File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 11import re
22import os
33
4- file_location = "kepconfig/__init__.py"
4+ file_location = "./ kepconfig/__init__.py"
55version_re_string = "([0-9]+)\.([0-9]+)\.([0-9]+(?:[ab][0-9])?)"
66version_search = re .compile (r'__version__ = "' + version_re_string + '"' )
77version_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+
5859if __name__ == "__main__" :
5960 release ()
You can’t perform that action at this time.
0 commit comments