added proto generation commands
This commit is contained in:
20
Makefile
20
Makefile
@@ -1,7 +1,7 @@
|
||||
# Sendico Development Environment - Makefile
|
||||
# Docker Compose + Makefile build system
|
||||
|
||||
.PHONY: help init build up down restart logs rebuild clean vault-init proto update update-api update-frontend test test-api test-frontend
|
||||
.PHONY: help init build up down restart logs rebuild clean vault-init proto generate generate-api generate-frontend update update-api update-frontend test test-api test-frontend
|
||||
|
||||
COMPOSE := docker compose -f docker-compose.dev.yml --env-file .env.dev
|
||||
SERVICE ?=
|
||||
@@ -43,6 +43,9 @@ help:
|
||||
@echo ""
|
||||
@echo "$(YELLOW)Development:$(NC)"
|
||||
@echo " make proto Generate protobuf code"
|
||||
@echo " make generate Generate all code (protobuf + Flutter)"
|
||||
@echo " make generate-api Generate protobuf code only"
|
||||
@echo " make generate-frontend Generate Flutter code only"
|
||||
@echo " make update Update all dependencies (Go + Flutter)"
|
||||
@echo " make update-api Update Go dependencies only"
|
||||
@echo " make update-frontend Update Flutter dependencies only"
|
||||
@@ -142,12 +145,25 @@ endif
|
||||
@echo "$(GREEN)✅ $(SERVICE) rebuilt$(NC)"
|
||||
@echo "View logs: make logs SERVICE=$(SERVICE)"
|
||||
|
||||
# Generate protobuf code (alias)
|
||||
proto: generate-api
|
||||
|
||||
# Generate all code
|
||||
generate: generate-api generate-frontend
|
||||
|
||||
# Generate protobuf code
|
||||
proto:
|
||||
generate-api:
|
||||
@echo "$(GREEN)Generating protobuf code...$(NC)"
|
||||
@./generate_protos.sh
|
||||
@echo "$(GREEN)✅ Protobuf generation complete$(NC)"
|
||||
|
||||
# Generate Flutter code (json_serializable, etc.)
|
||||
generate-frontend:
|
||||
@echo "$(GREEN)Generating Flutter code...$(NC)"
|
||||
@cd frontend/pshared && flutter pub run build_runner build --delete-conflicting-outputs
|
||||
@cd frontend/pweb && flutter pub run build_runner build --delete-conflicting-outputs
|
||||
@echo "$(GREEN)✅ Flutter code generation complete$(NC)"
|
||||
|
||||
# Clean everything
|
||||
clean:
|
||||
@echo "$(YELLOW)WARNING: This will remove all containers and volumes!$(NC)"
|
||||
|
||||
Reference in New Issue
Block a user