We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2a6ae0 commit 7b5260eCopy full SHA for 7b5260e
1 file changed
fabfile.py
@@ -1,3 +1,6 @@
1
+import os.path
2
+import shutil
3
+
4
from fabric.api import local, lcd, puts, abort
5
6
@@ -12,6 +15,14 @@ def upload():
12
15
local('python setup.py sdist register upload')
13
16
14
17
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
26
def release(version, force=False):
27
"""Perform a release. Example:
28
@@ -22,6 +33,8 @@ def release(version, force=False):
33
abort("Version should not start with 'v'")
34
version_str = "v%s" % version
35
36
+ clean()
37
38
puts(" * Tagging Version %s" % version_str)
39
f = 'f' if force else ''
40
local("git tag -%sam \"%s\" %s" % (f, version_str, version_str))
0 commit comments