-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (53 loc) · 2.5 KB
/
Makefile
File metadata and controls
68 lines (53 loc) · 2.5 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
66
67
68
# =============================================================================
# csharp — Windows DFIR triage agent
# =============================================================================
SHELL := /bin/sh
COMPOSE ?= docker compose
ENV_FILE ?= .env
ARCP_VERSION ?= 1.0.0
SAMPLE ?= /samples/synthetic-case-001
.DEFAULT_GOAL := help
.PHONY: help
help: ## Show this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_%-]+:.*?## / {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
$(ENV_FILE):
@cp .env.example $(ENV_FILE)
@echo "Created $(ENV_FILE) from .env.example — edit as desired."
.PHONY: build
build: $(ENV_FILE) ## Build images (proves @latest install)
$(COMPOSE) --env-file $(ENV_FILE) build
.PHONY: up
up: $(ENV_FILE) ## Bring up ollama + runtime + client
$(COMPOSE) --env-file $(ENV_FILE) up --build --abort-on-container-exit --remove-orphans
.PHONY: up-detached
up-detached: $(ENV_FILE) ## Bring up in the background
$(COMPOSE) --env-file $(ENV_FILE) up -d --build
.PHONY: down
down: ## Stop and remove containers
$(COMPOSE) --env-file $(ENV_FILE) down --remove-orphans
.PHONY: logs
logs: ## Tail logs from all services
$(COMPOSE) --env-file $(ENV_FILE) logs -f --tail=200
.PHONY: shell
shell: ## Shell into the client container
$(COMPOSE) --env-file $(ENV_FILE) run --rm --entrypoint /bin/sh arcp-client
.PHONY: submit
submit: $(ENV_FILE) ## Submit a case via the client (override with SAMPLE=path)
$(COMPOSE) --env-file $(ENV_FILE) run --rm arcp-client submit $(SAMPLE)
.PHONY: watch
watch: $(ENV_FILE) ## Stream timeline events for a job (use JOB=<id>)
@if [ -z "$(JOB)" ]; then echo "usage: make watch JOB=<id>"; exit 2; fi
$(COMPOSE) --env-file $(ENV_FILE) run --rm arcp-client timeline $(JOB)
.PHONY: report
report: $(ENV_FILE) ## Download brief.pdf + open it (use JOB=<id>)
@if [ -z "$(JOB)" ]; then echo "usage: make report JOB=<id>"; exit 2; fi
$(COMPOSE) --env-file $(ENV_FILE) run --rm arcp-client report $(JOB)
.PHONY: smoke
smoke: ## Run local smoke tests (no docker, no Ollama)
dotnet test tests/SmokeTests/SmokeTests.csproj -p:ArcpVersion=$(ARCP_VERSION) --nologo
.PHONY: verify
verify: ## docker build only — proves @latest install resolves cleanly
docker build --build-arg ARCP_SDK_VERSION=$${ARCP_SDK_VERSION:-latest} --target runtime -t arcp-sdk-examples/csharp-verify:test .
.PHONY: clean
clean: down ## Remove built images
-docker rmi arcp-sdk-examples/csharp-runtime:dev arcp-sdk-examples/csharp-client:dev arcp-sdk-examples/csharp-verify:test 2>/dev/null || true