Newer
Older
flavor=development
entryPoint=main-dev.dart
iosBundleName=Vereign-dev
iosScheme=development
iosConfiguration=Release-development
flavor=production
entryPoint=main.dart
iosBundleName=Vereign
iosScheme=production
iosConfiguration=Release-production
endif
.PHONY: all build-ios build-android
all: build-ios build-android
run:
flutter run --flavor ${flavor} -t lib/${entryPoint}
build-ios: flutter-build-ios archive-ios export-ios ## Builds ios bundle and uploads it to the AppStore
build-android: ## Builds android bundle
flutter build apk --flavor ${flavor} -t lib/${entryPoint}
# For PlayMarket
# flutter build appbundle --target-platform android-arm,android-arm64
flutter-build-ios: ## Performs flutter build
flutter build ios --flavor $(flavor) -t lib/$(entryPoint)
archive-ios: ## Creates .xarchive from fullter build
xcodebuild \
-workspace ios/Runner.xcworkspace \
-scheme ${iosScheme} \
-sdk iphoneos \
-configuration ${iosConfiguration} \
archive -archivePath \
build/ios/$(iosBundleName).xcarchive
export-ios: ## Exports ipa and uploads it to AppStore
xcodebuild \
-exportArchive \
-archivePath build/ios/${iosBundleName}.xcarchive \
-exportOptionsPlist ios/exportOptions-dev.plist \
-exportPath build/ios/${iosBundleName}
clean: ## Removes build directory
flutter clean