Commit fad8cf5e authored by Pietro Albini's avatar Pietro Albini

Fix due to an Invoke breaking change

parent 81e94384
......@@ -27,6 +27,12 @@ PYTHON = "python3"
PROJECT = "uitwww"
# This is because invoke can't keep backward compatibility...
_invoke_v = invoke.__version__.split(".")
if int(_invoke_v[0]) == 0 and int(_invoke_v[1]) <= 12:
invoke.task = invoke.ctask
def create_env(name, requirements=False, self=False, force=False):
"""Create a new virtual environment"""
path = os.path.join(BASE, "build", "envs", name)
......@@ -48,7 +54,7 @@ def create_env(name, requirements=False, self=False, force=False):
def clean():
def clean(ctx):
"""Clean all the build things"""
for dir in "build", "%s.egg-info" % PROJECT:
path = os.path.join(BASE, dir)
......@@ -104,7 +110,7 @@ def clean():
def assets(watch=False):
def assets(ctx, watch=False):
"""Build the assets"""
node_bin = "%s/node_modules/.bin" % BASE
......@@ -122,13 +128,13 @@ def assets(watch=False):
def devel():
def devel(ctx):
"""Setup the development environment"""
create_env("devel", self=True, force=True)
def build():
def build(ctx):
"""Create a new build"""
env = create_env("build", requirements=True)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment