More / Better Scripts for Task Running
This commit is contained in:
parent
b23dc8a627
commit
0f7b799c11
5
Pipfile
5
Pipfile
@ -14,6 +14,7 @@ pandoc = "*"
|
|||||||
pylint-django = "*"
|
pylint-django = "*"
|
||||||
setuptools = "*"
|
setuptools = "*"
|
||||||
django-nose = "*"
|
django-nose = "*"
|
||||||
|
invoke = "*"
|
||||||
|
|
||||||
[packages]
|
[packages]
|
||||||
django = "*"
|
django = "*"
|
||||||
@ -30,3 +31,7 @@ showmigrations = "django_lostplaces/manage.py showmigrations"
|
|||||||
makemigrations = "django_lostplaces/manage.py makemigrations --no-input"
|
makemigrations = "django_lostplaces/manage.py makemigrations --no-input"
|
||||||
migrate = "django_lostplaces/manage.py migrate"
|
migrate = "django_lostplaces/manage.py migrate"
|
||||||
build = "django_lostplaces/setup.py bdist_wheel --universal"
|
build = "django_lostplaces/setup.py bdist_wheel --universal"
|
||||||
|
createsuperuser = "django_lostplaces/manage.py createsuperuser --noinput --username admin --email admin@example.org"
|
||||||
|
createsuperuser_prompt = "django_lostplaces/manage.py createsuperuser"
|
||||||
|
quickstart = "invoke quickstart"
|
||||||
|
security = "pipenv check"
|
21
tasks.py
Normal file
21
tasks.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
from invoke import task
|
||||||
|
|
||||||
|
@task
|
||||||
|
def quickstart(c):
|
||||||
|
commands = [
|
||||||
|
'pipenv run migrate',
|
||||||
|
'pipenv run createsuperuser',
|
||||||
|
'pipenv run server'
|
||||||
|
]
|
||||||
|
c.run(' && '.join(commands))
|
||||||
|
|
||||||
|
@task
|
||||||
|
def live(c):
|
||||||
|
commands = [
|
||||||
|
'pipenv check',
|
||||||
|
'pipenv run test',
|
||||||
|
'pipenv run migrate',
|
||||||
|
'pipenv run createsuperuser_prompt'
|
||||||
|
'pipenv run server'
|
||||||
|
]
|
||||||
|
c.run(' && '.join(commands))
|
Loading…
Reference in New Issue
Block a user