diff --git a/Makefile b/Makefile index 1153b176..bfaa57f6 100644 --- a/Makefile +++ b/Makefile @@ -70,11 +70,11 @@ help: @echo " --- MOBILE APP DEVELOPMENT ---" @echo " make mobile-client-install - Install dependencies for client app" @echo " make mobile-client-dev - Run client app in development mode" - @echo " make mobile-client-build - Build client app (requires ENV & PLATFORM)" + @echo " make mobile-client-build - Build client app (requires ENV & PLATFORM, optional BUILD_TYPE=apk)" @echo "" @echo " make mobile-staff-install - Install dependencies for staff app" @echo " make mobile-staff-dev - Run staff app in development mode" - @echo " make mobile-staff-build - Build staff app (requires ENV & PLATFORM)" + @echo " make mobile-staff-build - Build staff app (requires ENV & PLATFORM, optional BUILD_TYPE=apk)" @echo "" @echo " --- DEPLOYMENT ---" @echo " make deploy-launchpad-full - Deploys internal launchpad to Cloud Run (dev only) with IAP." @@ -339,11 +339,11 @@ else ifeq ($(ENV),prod) FLAVOR := production endif +BUILD_TYPE ?= appbundle + mobile-client-install: @echo "--> Installing Flutter dependencies for client app..." - @cd mobile-apps/client-app && \ - $(FLUTTER) pub get && \ - $(FLUTTER) pub run build_runner build --delete-conflicting-outputs + @cd mobile-apps/client-app && $(FLUTTER) pub get mobile-client-dev: @echo "--> Running client app in development mode..." @@ -362,16 +362,15 @@ mobile-client-build: $(FLUTTER) pub get && \ $(FLUTTER) pub run build_runner build --delete-conflicting-outputs && \ if [ "$(PLATFORM)" = "android" ]; then \ - $(FLUTTER) build appbundle --flavor $(FLAVOR); \ + $(FLUTTER) build $(BUILD_TYPE) --flavor $(FLAVOR); \ elif [ "$(PLATFORM)" = "ios" ]; then \ $(FLUTTER) build ipa --flavor $(FLAVOR); \ fi + mobile-staff-install: @echo "--> Installing Flutter dependencies for staff app..." - @cd mobile-apps/staff-app && \ - $(FLUTTER) pub get && \ - $(FLUTTER) pub run build_runner build --delete-conflicting-outputs + @cd mobile-apps/staff-app && $(FLUTTER) pub get mobile-staff-dev: @echo "--> Running staff app in development mode..." @@ -390,7 +389,7 @@ mobile-staff-build: $(FLUTTER) pub get && \ $(FLUTTER) pub run build_runner build --delete-conflicting-outputs && \ if [ "$(PLATFORM)" = "android" ]; then \ - $(FLUTTER) build appbundle --flavor $(FLAVOR); \ + $(FLUTTER) build $(BUILD_TYPE) --flavor $(FLAVOR); \ elif [ "$(PLATFORM)" = "ios" ]; then \ $(FLUTTER) build ipa --flavor $(FLAVOR); \ - fi + fi \ No newline at end of file