Skip to content

Commit 29fc223

Browse files
committed
Add publish command to gov-cli
1 parent d187758 commit 29fc223

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

gov-cli

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
#!/usr/bin/env python3
22
from gov_cli import main
3+
from gov_cli.gov_cli import run_cli_command
4+
import sys
5+
6+
def cli_main():
7+
if len(sys.argv)==2:
8+
if sys.argv[1]=='publish':
9+
run_cli_command(['python','setup.py', 'sdist', 'bdist_wheel'])
10+
result=run_cli_command(['twine','upload', 'dist/*'])
11+
print(result)
12+
return
13+
main()
14+
315
if __name__ == '__main__':
4-
main()
16+
cli_main()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="gov-cli",
5-
version="0.2",
5+
version="0.3",
66
packages=find_packages(),
77
install_requires=[
88
# List your dependencies here, e.g.:

0 commit comments

Comments
 (0)