added proto generation commands #467
20
Makefile
20
Makefile
@@ -1,7 +1,7 @@
|
|||||||
# Sendico Development Environment - Makefile
|
# Sendico Development Environment - Makefile
|
||||||
# Docker Compose + Makefile build system
|
# 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
|
COMPOSE := docker compose -f docker-compose.dev.yml --env-file .env.dev
|
||||||
SERVICE ?=
|
SERVICE ?=
|
||||||
@@ -43,6 +43,9 @@ help:
|
|||||||
@echo ""
|
@echo ""
|
||||||
@echo "$(YELLOW)Development:$(NC)"
|
@echo "$(YELLOW)Development:$(NC)"
|
||||||
@echo " make proto Generate protobuf code"
|
@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 Update all dependencies (Go + Flutter)"
|
||||||
@echo " make update-api Update Go dependencies only"
|
@echo " make update-api Update Go dependencies only"
|
||||||
@echo " make update-frontend Update Flutter dependencies only"
|
@echo " make update-frontend Update Flutter dependencies only"
|
||||||
@@ -142,12 +145,25 @@ endif
|
|||||||
@echo "$(GREEN)✅ $(SERVICE) rebuilt$(NC)"
|
@echo "$(GREEN)✅ $(SERVICE) rebuilt$(NC)"
|
||||||
@echo "View logs: make logs SERVICE=$(SERVICE)"
|
@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
|
# Generate protobuf code
|
||||||
proto:
|
generate-api:
|
||||||
@echo "$(GREEN)Generating protobuf code...$(NC)"
|
@echo "$(GREEN)Generating protobuf code...$(NC)"
|
||||||
@./generate_protos.sh
|
@./generate_protos.sh
|
||||||
@echo "$(GREEN)✅ Protobuf generation complete$(NC)"
|
@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 everything
|
||||||
clean:
|
clean:
|
||||||
@echo "$(YELLOW)WARNING: This will remove all containers and volumes!$(NC)"
|
@echo "$(YELLOW)WARNING: This will remove all containers and volumes!$(NC)"
|
||||||
|
|||||||
@@ -73,10 +73,13 @@ make build-api # notification, bff
|
|||||||
make build-frontend # Flutter web UI
|
make build-frontend # Flutter web UI
|
||||||
```
|
```
|
||||||
|
|
||||||
### Protobuf Generation
|
### Code Generation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make proto
|
make generate # Generate all code (protobuf + Flutter)
|
||||||
|
make generate-api # Generate protobuf code only
|
||||||
|
make generate-frontend # Generate Flutter code only (build_runner)
|
||||||
|
make proto # Alias for generate-api
|
||||||
```
|
```
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
|
|||||||
Reference in New Issue
Block a user