-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrelease.py
executable file
·41 lines (31 loc) · 988 Bytes
/
release.py
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
#!/usr/bin/env python3
import os
class Release:
"""
Class responsible to serve the library in pypi, not part of rocket executable
"""
"""Module responsible for building db-rocket itself and publishing it to pypi"""
def release(self):
"""
Build rocket for pypi doing all steps. Run it on the root of rocket project.
"""
os.system("rm -rf dist/* || true")
os.system("python3 -m build --no-isolation")
self.build()
self.upload()
def build(self):
"""
Build rocket for pypi. Run it on the root of rocket project.
"""
os.system("rm -rf dist/* || true")
os.system("python3 -m build --no-isolation")
print("Build successfull, uploading now")
def upload(self):
"""
Upload new package to pipy
:return:
"""
os.system("python3 -m twine upload dist/*")
if __name__ == "__main__":
import fire
fire.Fire(Release)