File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 1+ import os .path
2+ import shutil
3+
14from fabric .api import local , lcd , puts , abort
25
36
@@ -12,6 +15,14 @@ def upload():
1215 local ('python setup.py sdist register upload' )
1316
1417
18+ def clean ():
19+ puts ("* Cleaning Repo" )
20+ dirs = ['.tox' , 'SoftLayer.egg-info' , 'build' , 'dist' ]
21+ for d in dirs :
22+ if os .path .exists (d ) and os .path .isdir (d ):
23+ shutil .rmtree (d )
24+
25+
1526def release (version , force = False ):
1627 """Perform a release. Example:
1728
@@ -22,6 +33,8 @@ def release(version, force=False):
2233 abort ("Version should not start with 'v'" )
2334 version_str = "v%s" % version
2435
36+ clean ()
37+
2538 puts (" * Tagging Version %s" % version_str )
2639 f = 'f' if force else ''
2740 local ("git tag -%sam \" %s\" %s" % (f , version_str , version_str ))
You can’t perform that action at this time.
0 commit comments