Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Nuovo sito
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Nuovo sito
Commits
fad8cf5e
Commit
fad8cf5e
authored
Oct 23, 2016
by
Pietro Albini
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tasks.py due to an Invoke breaking change
parent
81e94384
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
tasks.py
tasks.py
+10
-4
No files found.
tasks.py
View file @
fad8cf5e
...
@@ -27,6 +27,12 @@ PYTHON = "python3"
...
@@ -27,6 +27,12 @@ PYTHON = "python3"
PROJECT
=
"uitwww"
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
):
def
create_env
(
name
,
requirements
=
False
,
self
=
False
,
force
=
False
):
"""Create a new virtual environment"""
"""Create a new virtual environment"""
path
=
os
.
path
.
join
(
BASE
,
"build"
,
"envs"
,
name
)
path
=
os
.
path
.
join
(
BASE
,
"build"
,
"envs"
,
name
)
...
@@ -48,7 +54,7 @@ def create_env(name, requirements=False, self=False, force=False):
...
@@ -48,7 +54,7 @@ def create_env(name, requirements=False, self=False, force=False):
@
invoke
.
task
@
invoke
.
task
def
clean
():
def
clean
(
ctx
):
"""Clean all the build things"""
"""Clean all the build things"""
for
dir
in
"build"
,
"%s.egg-info"
%
PROJECT
:
for
dir
in
"build"
,
"%s.egg-info"
%
PROJECT
:
path
=
os
.
path
.
join
(
BASE
,
dir
)
path
=
os
.
path
.
join
(
BASE
,
dir
)
...
@@ -104,7 +110,7 @@ def clean():
...
@@ -104,7 +110,7 @@ def clean():
@
invoke
.
task
@
invoke
.
task
def
assets
(
watch
=
False
):
def
assets
(
ctx
,
watch
=
False
):
"""Build the assets"""
"""Build the assets"""
node_bin
=
"%s/node_modules/.bin"
%
BASE
node_bin
=
"%s/node_modules/.bin"
%
BASE
...
@@ -122,13 +128,13 @@ def assets(watch=False):
...
@@ -122,13 +128,13 @@ def assets(watch=False):
@
invoke
.
task
(
pre
=
[
assets
])
@
invoke
.
task
(
pre
=
[
assets
])
def
devel
():
def
devel
(
ctx
):
"""Setup the development environment"""
"""Setup the development environment"""
create_env
(
"devel"
,
self
=
True
,
force
=
True
)
create_env
(
"devel"
,
self
=
True
,
force
=
True
)
@
invoke
.
task
(
pre
=
[
assets
])
@
invoke
.
task
(
pre
=
[
assets
])
def
build
():
def
build
(
ctx
):
"""Create a new build"""
"""Create a new build"""
env
=
create_env
(
"build"
,
requirements
=
True
)
env
=
create_env
(
"build"
,
requirements
=
True
)
...
...
Pietro Albini
@pietroalbini
Mentioned in issue
#4 (closed)
·
Oct 25, 2016
Mentioned in issue
#4 (closed)
Mentioned in issue #4
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment