Skip to content

Commit

Permalink
Updated build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Mar 8, 2022
1 parent f54b972 commit 7f2b79c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 9 deletions.
9 changes: 6 additions & 3 deletions build_android.sh
@@ -1,4 +1,7 @@
flutter clean
flutter pub get
sh test.sh
#!/bin/bash
set -e

sh test.sh --clean --pub_get --delete_conflicting_outputs

echo 'Creating android bundle...'
flutter build appbundle
11 changes: 8 additions & 3 deletions build_windows.sh
@@ -1,5 +1,10 @@
flutter clean
flutter pub get
sh test.sh
#!/bin/bash
set -e

sh test.sh --clean --pub_get --delete_conflicting_outputs

echo 'Building windows app...'
flutter build windows

echo 'Creating windows installer...'
flutter pub run msix:create
32 changes: 29 additions & 3 deletions test.sh
@@ -1,4 +1,30 @@
flutter clean
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
#!/bin/bash
set -e

while [[ "$#" -gt 0 ]]; do
case $1 in
--clean) clean=1; ;;
--pub_get) pub_get=1; ;;
--delete_conflicting_outputs) delete_conflicting_outputs=1; ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
done

if [ "$clean" = 1 ]; then
echo 'Cleaning project...'
flutter clean
fi

if [ "$pub_get" = 1 ]; then
echo 'Retrieving packages...'
flutter pub get
fi

if [ "$delete_conflicting_outputs" = 1 ]; then
echo 'Deleting conflicting outputs...'
flutter pub run build_runner build --delete-conflicting-outputs
fi

echo 'Running tests...'
flutter test

0 comments on commit 7f2b79c

Please sign in to comment.