fix: update mobile app build commands to include optional BUILD_TYPE parameter

This commit is contained in:
Achintha Isuru
2025-11-18 23:09:30 -05:00
parent 7aa84bc536
commit 5f17b001d4

View File

@@ -70,11 +70,11 @@ help:
@echo " --- MOBILE APP DEVELOPMENT ---" @echo " --- MOBILE APP DEVELOPMENT ---"
@echo " make mobile-client-install - Install dependencies for client app" @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-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 ""
@echo " make mobile-staff-install - Install dependencies for staff app" @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-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 ""
@echo " --- DEPLOYMENT ---" @echo " --- DEPLOYMENT ---"
@echo " make deploy-launchpad-full - Deploys internal launchpad to Cloud Run (dev only) with IAP." @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 FLAVOR := production
endif endif
BUILD_TYPE ?= appbundle
mobile-client-install: mobile-client-install:
@echo "--> Installing Flutter dependencies for client app..." @echo "--> Installing Flutter dependencies for client app..."
@cd mobile-apps/client-app && \ @cd mobile-apps/client-app && $(FLUTTER) pub get
$(FLUTTER) pub get && \
$(FLUTTER) pub run build_runner build --delete-conflicting-outputs
mobile-client-dev: mobile-client-dev:
@echo "--> Running client app in development mode..." @echo "--> Running client app in development mode..."
@@ -362,16 +362,15 @@ mobile-client-build:
$(FLUTTER) pub get && \ $(FLUTTER) pub get && \
$(FLUTTER) pub run build_runner build --delete-conflicting-outputs && \ $(FLUTTER) pub run build_runner build --delete-conflicting-outputs && \
if [ "$(PLATFORM)" = "android" ]; then \ if [ "$(PLATFORM)" = "android" ]; then \
$(FLUTTER) build appbundle --flavor $(FLAVOR); \ $(FLUTTER) build $(BUILD_TYPE) --flavor $(FLAVOR); \
elif [ "$(PLATFORM)" = "ios" ]; then \ elif [ "$(PLATFORM)" = "ios" ]; then \
$(FLUTTER) build ipa --flavor $(FLAVOR); \ $(FLUTTER) build ipa --flavor $(FLAVOR); \
fi fi
mobile-staff-install: mobile-staff-install:
@echo "--> Installing Flutter dependencies for staff app..." @echo "--> Installing Flutter dependencies for staff app..."
@cd mobile-apps/staff-app && \ @cd mobile-apps/staff-app && $(FLUTTER) pub get
$(FLUTTER) pub get && \
$(FLUTTER) pub run build_runner build --delete-conflicting-outputs
mobile-staff-dev: mobile-staff-dev:
@echo "--> Running staff app in development mode..." @echo "--> Running staff app in development mode..."
@@ -390,7 +389,7 @@ mobile-staff-build:
$(FLUTTER) pub get && \ $(FLUTTER) pub get && \
$(FLUTTER) pub run build_runner build --delete-conflicting-outputs && \ $(FLUTTER) pub run build_runner build --delete-conflicting-outputs && \
if [ "$(PLATFORM)" = "android" ]; then \ if [ "$(PLATFORM)" = "android" ]; then \
$(FLUTTER) build appbundle --flavor $(FLAVOR); \ $(FLUTTER) build $(BUILD_TYPE) --flavor $(FLAVOR); \
elif [ "$(PLATFORM)" = "ios" ]; then \ elif [ "$(PLATFORM)" = "ios" ]; then \
$(FLUTTER) build ipa --flavor $(FLAVOR); \ $(FLUTTER) build ipa --flavor $(FLAVOR); \
fi fi