mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Run translation step as part of "update"
This commit is contained in:
parent
d8eefec065
commit
92aace1278
37
tasks.py
37
tasks.py
@ -175,22 +175,6 @@ def static(c):
|
||||
manage(c, "collectstatic --no-input")
|
||||
|
||||
|
||||
@task(pre=[install, migrate, static, clean_settings])
|
||||
def update(c):
|
||||
"""
|
||||
Update InvenTree installation.
|
||||
|
||||
This command should be invoked after source code has been updated,
|
||||
e.g. downloading new code from GitHub.
|
||||
|
||||
The following tasks are performed, in order:
|
||||
|
||||
- install
|
||||
- migrate
|
||||
- static
|
||||
"""
|
||||
pass
|
||||
|
||||
@task(post=[static])
|
||||
def translate(c):
|
||||
"""
|
||||
@ -208,6 +192,25 @@ def translate(c):
|
||||
|
||||
c.run(f'python {path}')
|
||||
|
||||
|
||||
@task(pre=[install, migrate, translate, clean_settings])
|
||||
def update(c):
|
||||
"""
|
||||
Update InvenTree installation.
|
||||
|
||||
This command should be invoked after source code has been updated,
|
||||
e.g. downloading new code from GitHub.
|
||||
|
||||
The following tasks are performed, in order:
|
||||
|
||||
- install
|
||||
- migrate
|
||||
- translate
|
||||
- clean_settings
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@task
|
||||
def style(c):
|
||||
"""
|
||||
@ -217,6 +220,7 @@ def style(c):
|
||||
print("Running PEP style checks...")
|
||||
c.run('flake8 InvenTree')
|
||||
|
||||
|
||||
@task
|
||||
def test(c, database=None):
|
||||
"""
|
||||
@ -228,6 +232,7 @@ def test(c, database=None):
|
||||
# Run coverage tests
|
||||
manage(c, 'test', pty=True)
|
||||
|
||||
|
||||
@task
|
||||
def coverage(c):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user