Run translation step as part of "update"

This commit is contained in:
Oliver 2021-08-17 18:22:07 +10:00
parent d8eefec065
commit 92aace1278

View File

@ -175,22 +175,6 @@ def static(c):
manage(c, "collectstatic --no-input") 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]) @task(post=[static])
def translate(c): def translate(c):
""" """
@ -208,6 +192,25 @@ def translate(c):
c.run(f'python {path}') 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 @task
def style(c): def style(c):
""" """
@ -217,6 +220,7 @@ def style(c):
print("Running PEP style checks...") print("Running PEP style checks...")
c.run('flake8 InvenTree') c.run('flake8 InvenTree')
@task @task
def test(c, database=None): def test(c, database=None):
""" """
@ -228,6 +232,7 @@ def test(c, database=None):
# Run coverage tests # Run coverage tests
manage(c, 'test', pty=True) manage(c, 'test', pty=True)
@task @task
def coverage(c): def coverage(c):
""" """