forked from CybercentreCanada/clue
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (54 loc) · 1.98 KB
/
Copy pathMakefile
File metadata and controls
65 lines (54 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
SHELL = /bin/bash
.PHONY: setup
setup: ## Install dependencies for both UI and API components
@echo "Setting up development environment..."
@if ! command -v pnpm >/dev/null 2>&1; then \
@echo "Installing pnpm..."; \
@echo -n "⏩ "; \
npm install --global corepack@latest; \
corepack enable pnpm; \
else \
echo "✅ pnpm is already installed"; \
fi
@if ! command -v poetry >/dev/null 2>&1; then \
@echo "Installing poetry..."; \
@echo -n "⏩ "; \
python -m pip install poetry; \
else \
echo "✅ poetry is already installed"; \
fi
@echo "Installing UI dependencies..."
@echo -n "⏩ "
cd ui && pnpm install
@echo "Installing API dependencies..."
@echo -n "⏩ "
cd api && poetry install --all-extras --with test,dev,types
@echo "🎉 Setup complete!"
.PHONY: start-dependencies
start-dependencies: ## Start development dependencies (Redis, Keycloak) in Docker
@echo "Starting development dependencies..."
@echo -n "⏩ "
cd api/dev && docker compose up --build -d
@echo "✅ Dependencies are running in the background"
.PHONY: stop-dependencies
stop-dependencies: ## Stop development dependencies (Redis, Keycloak) in Docker
@echo "Stopping development dependencies..."
@echo -n "⏩ "
cd api/dev && docker compose down
@echo "✅ Dependencies have been stopped"
.PHONY: test-plugin
test-plugin: ## Run a specific plugin interactively (usage: make test-plugin <plugin-name>)
@if [ -z "$(filter-out $@,$(MAKECMDGOALS))" ]; then \
echo "❌ Error: Plugin name is required. Usage: make test-plugin <plugin-name>"; \
exit 1; \
fi
@echo "✅ Running plugin: $(filter-out $@,$(MAKECMDGOALS))"
@echo -n "⏩ "
cd plugins/setup && python interactive.py $(filter-out $@,$(MAKECMDGOALS))
.PHONY: create-plugin
create-plugin: ## Create a new plugin
@cd plugins/setup && python create.py
.PHONY: help
help: ## Show this help message
@echo "Available commands:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-25s %s\n", $$1, $$2}'