自动化任务
- 构建号和版本号的增量
- 构建并部署到iOS
- 构建并部署到Android
所以,让我们开始!
制作.env
ANDROID_UPLOAD_LINK: https://~~~
进行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 🎉🎉🎉"
授予行政权力部署。
chmod +x deploy.sh
尝试命令! ð
./deploy.sh
Spainara