give do_build --ios and --android options. bump version.

This commit is contained in:
stopflock committed 2025-09-28 18:14:08 -05:00
1 parent 7c49b38230
commit c9f1ecf7d0
2 files changed
+45 -12

No files matched your search

+44 -11
View File
@@ -1,20 +1,53 @@
#!/bin/bash #!/bin/bash
appver=$(cat lib/dev_config.dart | grep "kClientVersion" | cut -d '=' -f 2 | tr -d ';' | tr -d "\'" | tr -d " ") # Default options
BUILD_IOS=true
BUILD_ANDROID=true
# Parse arguments
for arg in "$@"; do
case $arg in
--ios)
BUILD_ANDROID=false
;;
--android)
BUILD_IOS=false
;;
*)
echo "Usage: $0 [--ios | --android]"
echo " --ios Build only iOS"
echo " --android Build only Android"
echo " (default builds both)"
exit 1
;;
esac
done
appver=$(grep "kClientVersion" lib/dev_config.dart | cut -d '=' -f 2 | tr -d ';' | tr -d "\'" | tr -d " ")
echo echo
echo "Building app version ${appver}..." echo "Building app version ${appver}..."
flutter build ios --no-codesign
flutter build apk
echo echo
echo "Converting .app to .ipa..." if [ "$BUILD_IOS" = true ]; then
./app2ipa.sh build/ios/iphoneos/Runner.app echo "Building iOS..."
echo flutter build ios --no-codesign || exit 1
echo "Moving files..." echo "Converting .app to .ipa..."
cp build/app/outputs/flutter-apk/app-release.apk ../flockmap_v${appver}.apk ./app2ipa.sh build/ios/iphoneos/Runner.app || exit 1
mv Runner.ipa ../flockmap_v${appver}.ipa
echo echo "Moving iOS files..."
mv Runner.ipa "../flockmap_v${appver}.ipa" || exit 1
echo
fi
if [ "$BUILD_ANDROID" = true ]; then
echo "Building Android..."
flutter build apk || exit 1
echo "Moving Android files..."
cp build/app/outputs/flutter-apk/app-release.apk "../flockmap_v${appver}.apk" || exit 1
echo
fi
echo "Done." echo "Done."
+1 -1
View File
@@ -33,7 +33,7 @@ const double kAddPinYOffset = 0.0;
// Client name and version for OSM uploads ("created_by" tag) // Client name and version for OSM uploads ("created_by" tag)
const String kClientName = 'DeFlock'; const String kClientName = 'DeFlock';
const String kClientVersion = '0.9.10'; const String kClientVersion = '0.9.11';
// Development/testing features - set to false for production builds // Development/testing features - set to false for production builds
const bool kEnableDevelopmentModes = false; // Set to false to hide sandbox/simulate modes and force production mode const bool kEnableDevelopmentModes = false; // Set to false to hide sandbox/simulate modes and force production mode