xxxxxxxxxx
#!/bin/bash
#my vars
BUILD_NAME="Local build 3.2.3"
BUILD_NO=10
#my vars injection
perl -i -pe 's/^(version:\s+\d+\.\d+\.\d+\+)(\d+)$/$1.('$BUILD_NO')/e' pubspec.yaml
#build ios
flutter build ipa --target=lib/main.dart \
--build-name=$BUILD_NAME \
--build-number=$BUILD_NO \
--export-options-plist=./ExportOptions.plist \
--release
#build android
flutter build apk --target=lib/main.dart \
--build-name=$BUILD_NAME \
--build-number=$BUILD_NO \
--release