Update Flutter submodule and make GitHub actions error out if it doesn't match latest/stable

This commit is contained in:
Imran Remtulla
2024-01-22 12:21:38 -05:00
parent fac335c849
commit f06de8d19f
3 changed files with 22 additions and 8 deletions

View File

@ -7,6 +7,9 @@ trap "cd "$CURR_DIR"" EXIT
if [ -z "$1" ]; then
git fetch && git merge origin/main && git push # Typically run after a PR to main, so bring dev up to date
fi
cd .flutter
git checkout "$(flutter --version | head -2 | tail -1 | awk '{print $4}')" # Ensure included Flutter submodule version equals my environment
cd ..
rm ./build/app/outputs/flutter-apk/* 2>/dev/null # Get rid of older builds if any
flutter build apk --flavor normal && flutter build apk --split-per-abi --flavor normal # Build (both split and combined APKs)
for file in ./build/app/outputs/flutter-apk/app-*normal*.apk*; do mv "$file" "${file//-normal/}"; done