Skip to content
Snippets Groups Projects
Commit be3e995c authored by Markin Igor's avatar Markin Igor
Browse files

Replace all scripts with Makefile

parent 825a3d03
No related branches found
No related tags found
1 merge request!3Resolve "Set up building process."
Makefile 0 → 100644
flavor=production
entryPoint=main.dart
iosBundleName=Vereign
iosScheme=production
iosConfiguration=Release-production
ifeq ($(target), development)
flavor=development
entryPoint=main-dev.dart
iosBundleName=Vereign-dev
iosScheme=development
iosConfiguration=Release-development
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 upload to the AppStore
build-android: ## Builds android bundle
flutter build apk --flavor ${flavor} -t lib/${entryPoint}
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
\ No newline at end of file
#!/usr/bin/env bash
flavor='production'
entryPoint='main.dart'
if [[ $1 == 'development' ]]
then
flavor='development'
entryPoint='main-dev.dart'
fi
# Build android
flutter build apk --flavor ${flavor} -t lib/${entryPoint}
# Move packages wherever we need
# cp build/app/outputs/apk/development/release/app-development-release.apk /path
# cp build/app/outputs/apk/production/release/app-production-release.apk /path
# Cleanup
# flutter clean
#!/usr/bin/env bash
flavor='production'
scheme='production'
configuration='Release-production'
entryPoint='main.dart'
bundleName="Vereign"
if [[ $1 == 'development' ]]
then
flavor='development'
scheme='development'
configuration='Release-development'
entryPoint='main-dev.dart'
bundleName="Vereign-dev"
fi
# Build ios
flutter build ios --flavor ${flavor} -t lib/${entryPoint}
# Export xarchive
xcodebuild \
-workspace ios/Runner.xcworkspace \
-scheme ${scheme} \
-sdk iphoneos \
-configuration ${configuration} \
archive -archivePath \
build/ios/${bundleName}.xcarchive
# Package ipa
xcodebuild \
-exportArchive \
-archivePath build/ios/${bundleName}.xcarchive \
-exportOptionsPlist ios/exportOptions-dev.plist \
-exportPath build/ios/${bundleName}
# Cleanup
# flutter clean
#!/usr/bin/env bash
flavor='development'
entryPoint='main-dev.dart'
if [[ $1 == 'production' ]]
then
flavor='production'
entryPoint='main.dart'
fi
flutter run --flavor ${flavor} -t lib/${entryPoint}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment