-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart
More file actions
executable file
·44 lines (40 loc) · 1.27 KB
/
start
File metadata and controls
executable file
·44 lines (40 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python
import os
import questionary
def main():
answers = questionary.select(
"What do you want to do?",
choices=[
"commit",
"lint",
"build",
"release",
"upload jfrog",
"upload pypi",
"install hooks",
],
).ask() # returns value of selection
if answers == "lint":
os.system("black .")
elif answers == "commit":
os.system("black .")
os.system("cz c")
elif answers == "install hooks":
os.system("pre-commit install")
os.system("pre-commit install --hook-type commit-msg")
elif answers == "build":
os.system("rm dist/*")
os.system("python setup.py sdist bdist_wheel")
elif answers == "upload pypi":
os.system("rm dist/*")
os.system("python setup.py sdist bdist_wheel")
os.system("python -m twine upload dist/*")
elif answers == "upload jfrog":
os.system("rm dist/*")
os.system("python setup.py sdist bdist_wheel")
os.system("python -m twine upload -r caesari dist/* --config-file ~/.pypirc")
elif answers == "release":
os.system("black .")
os.system("cz bump -ch --check-consistency")
if __name__ == "__main__":
main()