mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Tweak tasks.py (#648)
This commit is contained in:
parent
9ea7a2348b
commit
c3f390eddc
1 changed files with 11 additions and 7 deletions
18
tasks.py
18
tasks.py
|
|
@ -1,4 +1,4 @@
|
||||||
"""Invoke tasks for building the app"""
|
"""Invoke tasks for building the InvenTree mobile app."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
@ -7,13 +7,17 @@ from invoke import task
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def clean(c):
|
def clean(c):
|
||||||
"""Clean flutter build"""
|
"""Clean flutter build."""
|
||||||
c.run("flutter clean")
|
c.run("flutter clean")
|
||||||
|
|
||||||
|
@task
|
||||||
|
def update(c):
|
||||||
|
"""Update flutter dependencies."""
|
||||||
|
c.run("flutter pub get")
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def translate(c):
|
def translate(c):
|
||||||
"""Update translation files"""
|
"""Update translation files."""
|
||||||
|
|
||||||
here = os.path.dirname(__file__)
|
here = os.path.dirname(__file__)
|
||||||
l10_dir = os.path.join(here, 'lib', 'l10n')
|
l10_dir = os.path.join(here, 'lib', 'l10n')
|
||||||
|
|
@ -23,13 +27,13 @@ def translate(c):
|
||||||
c.run(f"cd {l10_dir} && {python} collect_translations.py")
|
c.run(f"cd {l10_dir} && {python} collect_translations.py")
|
||||||
|
|
||||||
|
|
||||||
@task(pre=[clean, translate])
|
@task(pre=[clean, update, translate])
|
||||||
def ios(c):
|
def ios(c):
|
||||||
"""Build iOS app"""
|
"""Build iOS app in release configuration."""
|
||||||
c.run("flutter build ipa --release --no-tree-shake-icons")
|
c.run("flutter build ipa --release --no-tree-shake-icons")
|
||||||
|
|
||||||
|
|
||||||
@task(pre=[clean, translate])
|
@task(pre=[clean, update, translate])
|
||||||
def android(c):
|
def android(c):
|
||||||
"""Build Android app"""
|
"""Build Android app in release configuration."""
|
||||||
c.run("flutter build appbundle --release --no-tree-shake-icons")
|
c.run("flutter build appbundle --release --no-tree-shake-icons")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue