-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_release.sh
executable file
·37 lines (31 loc) · 1.26 KB
/
build_release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /bin/bash
PROGRAM="mundanequest"
VERSION="v0.2"
echo "Building:" ${PROGRAM}
# clean build directory
echo "Cleaning build directories..."
flutter clean
# build for web deployment
echo "Building web version..."
flutter build web --base-href=/mq/ --no-sound-null-safety
cd build || exit
mv web "${PROGRAM}-web"
zip -r "${PROGRAM}-${VERSION}-web.zip" "${PROGRAM}-web"
cd ..
mv "build/${PROGRAM}-${VERSION}-web.zip" .
# build linux version
echo "Building linux version..."
flutter build linux --no-sound-null-safety
cd build/linux/x64/release || exit
mv bundle "${PROGRAM}-linux"
zip -r "${PROGRAM}-${VERSION}-linux.zip" "${PROGRAM}-linux"
cd ../../../..
mv "build/linux/x64/release/${PROGRAM}-${VERSION}-linux.zip" .
# build Android version
echo "Building Android version..."
flutter build appbundle --no-sound-null-safety
cp build/app/outputs/bundle/release/app-release.aab ./${PROGRAM}-${VERSION}-release.aab
flutter build apk --split-per-abi --no-sound-null-safety
cp build/app/outputs/flutter-apk/app-arm64-v8a-release.apk ./${PROGRAM}-${VERSION}-arm64-v8a-release.apk
cp build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk ./${PROGRAM}-${VERSION}-armeabi-v7a-release.apk
cp build/app/outputs/flutter-apk/app-x86_64-release.apk ./${PROGRAM}-${VERSION}-x86_64-release.apk