From ba1df2e8174a2be5f747ffd3ff012905edd626f1 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 19 Apr 2023 20:57:40 +1000 Subject: [PATCH] Adds invoke script for automating release tasks (#324) --- tasks.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tasks.py diff --git a/tasks.py b/tasks.py new file mode 100644 index 00000000..c1629db4 --- /dev/null +++ b/tasks.py @@ -0,0 +1,27 @@ +"""Invoke tasks for building the app""" + +from invoke import task + + +@task +def clean(c): + """Clean flutter build""" + c.run("flutter clean") + + +@task +def translate(c): + """Update translation files""" + c.run("cd lib/l10n && python collect_translations.py") + + +@task(pre=[clean, translate]) +def ios(c): + """Build iOS app""" + c.run("flutter build ipa --release --no-tree-shake-icons") + + +@task(pre=[clean, translate]) +def android(c): + """Build Android app""" + c.run("flutter build appbundle --release --no-tree-shake-icons")