Automation Tasks
- Increment of build number and version number
- Build and deploy to iOS
- Build and deploy to Android
So, letโs get started!
Make .env
ANDROID_UPLOAD_LINK: https://~~~
Make deploy.sh
#!/bin/bash
iosDeploy() {
echo "๐ iOS build started ๐๐๐"
flutter build ipa --release --export-options-plist=ExportOptions.plist
echo "๐ iOS build finished ๐๐๐"
}
androidDeploy() {
echo "๐ Android build started ๐๐๐"
flutter build appbundle
open -R ./build/app/outputs/bundle/release/app-release.aab
open $ANDROID_UPLOAD_LINK
echo "๐ Android build finished ๐๐๐"
}
# Increment version
perl -i -pe 's/^(version:\s+\d+\.\d+\.\d+\+)(\d+)$/$1.($2+1)/e' pubspec.yaml
source .env
# Deploy
iosDeploy &
androidDeploy &
wait
echo "Both builds finished ๐๐๐"
Grant executive authority to deploy.sh
chmod +x deploy.sh
Try the command! ๐ฆ
./deploy.sh
SAYONARA
Top comments (0)