-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathupdate.py
More file actions
17 lines (14 loc) · 717 Bytes
/
update.py
File metadata and controls
17 lines (14 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import subprocess
import os
path = os.path.realpath("pygin/VERSION.py")
root_path = os.path.realpath("")
version_file = open(path, 'w')
version = input("What will be this version? ")
version_file.write("def get_version():\n return '" + str(version) + "'\n")
bashCommands = ["cd " + root_path + " ; python -m pip install --upgrade setuptools wheel",
"cd " + root_path + " ; python setup.py sdist",
"cd " + root_path + " ; python -m pip install --upgrade twine",
"cd " + root_path + " ; twine upload --repository-url https://upload.pypi.org/legacy/ dist/*"]
for bashCommand in bashCommands:
print(bashCommand)
process = subprocess.call(bashCommand.split())