Merge branch 'dev' into authentication-web
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# --- Data Connect / Backend ---
|
||||
|
||||
.PHONY: dataconnect-enable-apis dataconnect-init dataconnect-deploy dataconnect-sql-migrate dataconnect-generate-sdk dataconnect-sync dataconnect-bootstrap-db check-gcloud-beta
|
||||
.PHONY: dataconnect-enable-apis dataconnect-init dataconnect-deploy dataconnect-sql-migrate dataconnect-generate-sdk dataconnect-sync dataconnect-bootstrap-db check-gcloud-beta dataconnect-clean
|
||||
|
||||
# Enable all required APIs for Firebase Data Connect + Cloud SQL
|
||||
dataconnect-enable-apis:
|
||||
@@ -50,9 +50,16 @@ dataconnect-sync:
|
||||
# Execute seed in Firebase Data Connect
|
||||
dataconnect-seed:
|
||||
@echo "--> Exec seed in Firebase Data Connect..."
|
||||
@firebase dataconnect:execute seeds/seed_min.graphql --project=$(FIREBASE_ALIAS)
|
||||
@firebase dataconnect:execute backend/dataconnect/functions/seed.gql --project=$(FIREBASE_ALIAS)
|
||||
@echo "✅ Seed executed successfully."
|
||||
|
||||
|
||||
# Execute clean, to delete all the data in Firebase Data Connect
|
||||
dataconnect-clean:
|
||||
@echo "--> Exec clean all the data in Firebase Data Connect..."
|
||||
@firebase dataconnect:execute backend/dataconnect/functions/clean.gql --project=$(FIREBASE_ALIAS)
|
||||
@echo "✅ Clean information executed successfully."
|
||||
|
||||
# Run tests for Data Connect deployment and migrations
|
||||
dataconnect-test:
|
||||
@echo "--> Running Data Connect tests..."
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
.PHONY: launchpad-dev deploy-launchpad-hosting
|
||||
|
||||
launchpad-dev:
|
||||
launchpad-dev: sync-prototypes
|
||||
@echo "--> Starting local Launchpad server using Firebase Hosting emulator..."
|
||||
@echo " - Generating secure email hashes..."
|
||||
@node scripts/generate-allowed-hashes.js
|
||||
@firebase serve --only hosting:launchpad --project=$(FIREBASE_ALIAS)
|
||||
|
||||
deploy-launchpad-hosting:
|
||||
deploy-launchpad-hosting: sync-prototypes
|
||||
@echo "--> Deploying Internal Launchpad to Firebase Hosting..."
|
||||
@echo " - Generating secure email hashes..."
|
||||
@node scripts/generate-allowed-hashes.js
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
# --- Mobile App Development ---
|
||||
|
||||
.PHONY: mobile-install mobile-info mobile-client-dev-android mobile-staff-dev-android mobile-client-build mobile-staff-build
|
||||
.PHONY: mobile-install mobile-info mobile-client-dev-android mobile-staff-dev-android mobile-client-build mobile-staff-build mobile-hot-reload mobile-hot-restart
|
||||
|
||||
MOBILE_DIR := apps/mobile
|
||||
|
||||
# Device ID for running mobile apps (override with DEVICE=<id>)
|
||||
# Find your device ID with: flutter devices
|
||||
DEVICE ?= android
|
||||
|
||||
# --- General ---
|
||||
mobile-install: install-melos
|
||||
mobile-install: install-melos dataconnect-generate-sdk
|
||||
@echo "--> Bootstrapping mobile workspace (Melos)..."
|
||||
@cd $(MOBILE_DIR) && melos bootstrap
|
||||
@echo "--> Generating localization files..."
|
||||
@@ -15,12 +19,27 @@ mobile-info:
|
||||
@echo "--> Fetching mobile command info..."
|
||||
@cd $(MOBILE_DIR) && melos run info
|
||||
|
||||
# --- Client App ---
|
||||
mobile-client-dev-android:
|
||||
@echo "--> Running client app on Android..."
|
||||
@cd $(MOBILE_DIR) && melos run start:client -- -d android
|
||||
# --- Hot Reload & Restart ---
|
||||
mobile-hot-reload:
|
||||
@echo "--> Triggering hot reload for running Flutter app..."
|
||||
@cd $(MOBILE_DIR) && echo "r" | nc localhost 54321 2>/dev/null || \
|
||||
(cd apps/client && flutter attach --pid-file /tmp/flutter_client.pid && echo "r") || \
|
||||
(cd apps/staff && flutter attach --pid-file /tmp/flutter_staff.pid && echo "r") || \
|
||||
echo "❌ No running Flutter app found. Start an app first with mobile-client-dev-android or mobile-staff-dev-android"
|
||||
|
||||
mobile-client-build:
|
||||
mobile-hot-restart:
|
||||
@echo "--> Triggering hot restart for running Flutter app..."
|
||||
@cd $(MOBILE_DIR) && echo "R" | nc localhost 54321 2>/dev/null || \
|
||||
(cd apps/client && flutter attach --pid-file /tmp/flutter_client.pid && echo "R") || \
|
||||
(cd apps/staff && flutter attach --pid-file /tmp/flutter_staff.pid && echo "R") || \
|
||||
echo "❌ No running Flutter app found. Start an app first with mobile-client-dev-android or mobile-staff-dev-android"
|
||||
|
||||
# --- Client App ---
|
||||
mobile-client-dev-android: dataconnect-generate-sdk
|
||||
@echo "--> Running client app on Android (device: $(DEVICE))..."
|
||||
@cd $(MOBILE_DIR) && melos run start:client -- -d $(DEVICE) --dart-define-from-file=../../config.dev.json
|
||||
|
||||
mobile-client-build: dataconnect-generate-sdk
|
||||
@if [ -z "$(PLATFORM)" ]; then \
|
||||
echo "ERROR: PLATFORM is required (e.g. make mobile-client-build PLATFORM=apk)"; exit 1; \
|
||||
fi
|
||||
@@ -29,14 +48,14 @@ mobile-client-build:
|
||||
@cd $(MOBILE_DIR) && \
|
||||
melos exec --scope="core_localization" -- "dart run slang" && \
|
||||
melos exec --scope="core_localization" -- "dart run build_runner build --delete-conflicting-outputs" && \
|
||||
melos exec --scope="krowwithus_client" -- "flutter build $(PLATFORM) --$(MODE)"
|
||||
melos exec --scope="krowwithus_client" -- "flutter build $(PLATFORM) --$(MODE) --dart-define-from-file=../../config.dev.json"
|
||||
|
||||
# --- Staff App ---
|
||||
mobile-staff-dev-android:
|
||||
@echo "--> Running staff app on Android..."
|
||||
@cd $(MOBILE_DIR) && melos run start:staff -- -d android
|
||||
mobile-staff-dev-android: dataconnect-generate-sdk
|
||||
@echo "--> Running staff app on Android (device: $(DEVICE))..."
|
||||
@cd $(MOBILE_DIR) && melos run start:staff -- -d $(DEVICE)
|
||||
|
||||
mobile-staff-build:
|
||||
mobile-staff-build: dataconnect-generate-sdk
|
||||
@if [ -z "$(PLATFORM)" ]; then \
|
||||
echo "ERROR: PLATFORM is required (e.g. make mobile-staff-build PLATFORM=apk)"; exit 1; \
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user