Skip to content

Commit 84a90cd

Browse files
committed
Added publish action to setup script
1 parent 641c2e0 commit 84a90cd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

setup.py

100755100644
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import os
2+
import sys
23
from setuptools import setup
34

45
from django_hstore import get_version
56

67

8+
if sys.argv[-1] == 'publish':
9+
os.system("python setup.py sdist bdist_wheel upload -s")
10+
args = {'version': get_version()}
11+
print("You probably want to also tag the version now:")
12+
print(" git tag -a %(version)s -m 'version %(version)s'" % args)
13+
print(" git push --tags")
14+
sys.exit()
15+
16+
717
def get_packages(package):
818
"""
919
Return root package and all sub-packages.

0 commit comments

Comments
 (0)