Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cookiecutter flask
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Remy Mudingay
Cookiecutter flask
Commits
c5ba02a7
Commit
c5ba02a7
authored
8 years ago
by
Steven Loria
Browse files
Options
Downloads
Patches
Plain Diff
Upgrade to invoke 0.13.0
parent
ade2a08f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.travis.yml
+1
-1
1 addition, 1 deletion
.travis.yml
tasks.py
+11
-10
11 additions, 10 deletions
tasks.py
with
12 additions
and
11 deletions
.travis.yml
+
1
−
1
View file @
c5ba02a7
...
@@ -8,6 +8,6 @@ python:
...
@@ -8,6 +8,6 @@ python:
-
3.5
-
3.5
install
:
install
:
-
pip install cookiecutter
-
pip install cookiecutter
-
pip install invoke==0.1
2.2
-
pip install invoke==0.1
3.0
script
:
script
:
-
invoke test
-
invoke test
This diff is collapsed.
Click to expand it.
tasks.py
+
11
−
10
View file @
c5ba02a7
...
@@ -5,7 +5,7 @@ import os
...
@@ -5,7 +5,7 @@ import os
import
json
import
json
import
shutil
import
shutil
from
invoke
import
task
,
run
from
invoke
import
task
HERE
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
HERE
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
with
open
(
os
.
path
.
join
(
HERE
,
'
cookiecutter.json
'
),
'
r
'
)
as
fp
:
with
open
(
os
.
path
.
join
(
HERE
,
'
cookiecutter.json
'
),
'
r
'
)
as
fp
:
...
@@ -17,13 +17,13 @@ REQUIREMENTS = os.path.join(COOKIE, 'requirements', 'dev.txt')
...
@@ -17,13 +17,13 @@ REQUIREMENTS = os.path.join(COOKIE, 'requirements', 'dev.txt')
@task
@task
def
build
():
def
build
(
ctx
):
"""
Build the cookiecutter.
"""
"""
Build the cookiecutter.
"""
run
(
'
cookiecutter {0} --no-input
'
.
format
(
HERE
))
ctx
.
run
(
'
cookiecutter {0} --no-input
'
.
format
(
HERE
))
@task
@task
def
clean
():
def
clean
(
ctx
):
"""
Clean out generated cookiecutter.
"""
"""
Clean out generated cookiecutter.
"""
if
os
.
path
.
exists
(
COOKIE
):
if
os
.
path
.
exists
(
COOKIE
):
shutil
.
rmtree
(
COOKIE
)
shutil
.
rmtree
(
COOKIE
)
...
@@ -32,14 +32,15 @@ def clean():
...
@@ -32,14 +32,15 @@ def clean():
print
(
'
App directory does not exist. Skipping.
'
)
print
(
'
App directory does not exist. Skipping.
'
)
def
_run_
manage
_command
(
command
):
def
_run_
flask
_command
(
ctx
,
command
):
run
(
'
FLASK_APP={0} flask {1}
'
.
format
(
AUTOAPP
,
command
),
echo
=
True
)
ctx
.
run
(
'
FLASK_APP={0} flask {1}
'
.
format
(
AUTOAPP
,
command
),
echo
=
True
)
@task
(
pre
=
[
clean
,
build
])
@task
(
pre
=
[
clean
,
build
])
def
test
():
def
test
(
ctx
):
"""
Run lint commands and tests.
"""
"""
Run lint commands and tests.
"""
run
(
'
pip install -r {0} --ignore-installed
'
.
format
(
REQUIREMENTS
),
echo
=
True
)
ctx
.
run
(
'
pip install -r {0} --ignore-installed
'
.
format
(
REQUIREMENTS
),
echo
=
True
)
os
.
chdir
(
COOKIE
)
os
.
chdir
(
COOKIE
)
_run_
manage
_command
(
'
lint
'
)
_run_
flask
_command
(
'
lint
'
)
_run_
manage
_command
(
'
test
'
)
_run_
flask
_command
(
'
test
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment