Skip to content

Commit

Permalink
Changement script build
Browse files Browse the repository at this point in the history
  • Loading branch information
johan-perso committed Jun 15, 2024
1 parent f4ad2b9 commit c15a36b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
17 changes: 5 additions & 12 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,37 @@

DATE=$(date +"%Y-%m-%d")

# fr.johanstick.stendmobile
# Release Android - Store - APK
echo "================= 1/5 - Android (Store - APK)"
sed -i '' 's/fr.johanstick.stendmobile.dev/fr.johanstick.stendmobile/g' android/app/build.gradle
sed -i '' 's/fr.johanstick.stendmobile.dev/fr.johanstick.stendmobile/g' android/app/src/main/kotlin/com/example/stendmobile/MainActivity.kt
flutter build apk --release --dart-define="storeRelease=true"
mv build/app/outputs/flutter-apk/app-release.apk build/
rm -f build/StendMobile-android-$DATE-store.apk
mv build/app-release.apk build/StendMobile-android-$DATE-store.apk

# fr.johanstick.stendmobile
# Release Android - Store - AAB
echo "================= 2/5 - Android (Store - AAB)"
flutter build appbundle --release --dart-define="storeRelease=true"
mv build/app/outputs/bundle/release/app-release.aab build/
rm -f build/StendMobile-android-$DATE-store.aab
mv build/app-release.aab build/StendMobile-android-$DATE-store.aab

# fr.johanstick.stendmobile.dev
# Release Android - Open - APK
echo "================= 3/5 - Android (Open - APK)"
sed -i '' 's/fr.johanstick.stendmobile"/fr.johanstick.stendmobile.dev"/g' android/app/build.gradle
sed -i '' '/fr\.johanstick\.stendmobile\.dev/! s/fr\.johanstick\.stendmobile/fr.johanstick.stendmobile.dev/g' android/app/src/main/kotlin/com/example/stendmobile/MainActivity.kt
flutter build apk --release
mv build/app/outputs/flutter-apk/app-release.apk build/
rm -f build/StendMobile-android-$DATE-open.apk
mv build/app-release.apk build/StendMobile-android-$DATE-open.apk

# fr.johanstick.stendmobile
# Release iOS - Store - IPA
echo "================= 4/5 - iOS (Store - IPA)"
# sed -i '' 's/fr.johanstick.stendmobile.dev/fr.johanstick.stendmobile/g' ios/Runner.xcodeproj/project.pbxproj
flutter build ios --release --dart-define="storeRelease=true"
sh ./utils/toipa.sh build/ios/iphoneos/Runner.app
mv build/ios/iphoneos/Runner.ipa build/
rm -f build/StendMobile-ios-$DATE-store.ipa
mv build/Runner.ipa build/StendMobile-ios-$DATE-store.ipa

# fr.johanstick.stendmobile.dev
# Release iOS - Open - IPA
echo "================= 5/5 - iOS (Open - IPA)"
sed -i '' 's/fr.johanstick.stendmobile;/fr.johanstick.stendmobile.dev;/g' ios/Runner.xcodeproj/project.pbxproj
sed -i '' 's/fr.johanstick.stendmobile.Runner/fr.johanstick.stendmobile.dev.Runner/g' ios/Runner.xcodeproj/project.pbxproj
flutter build ios --release
sh ./utils/toipa.sh build/ios/iphoneos/Runner.app
mv build/ios/iphoneos/Runner.ipa build/
Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ publish_to: 'none'
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 2.0.0+4

version: 2.0.0+6

environment:
sdk: '>=3.1.5 <4.0.0'
Expand Down

0 comments on commit c15a36b

Please sign in to comment.