-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (37 loc) · 1.45 KB
/
Copy pathMakefile
File metadata and controls
47 lines (37 loc) · 1.45 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
.DEFAULT_GOAL := test
CONTAINER_ENGINE ?= $(shell which podman >/dev/null 2>&1 && echo podman || echo docker)
.PHONY: format
format:
uv run ruff check
uv run ruff format
.PHONY: test
test:
@for d in $(wildcard packages/*); do \
if [ -d "$$d" ]; then \
$(MAKE) -C $$d test || exit 1; \
fi \
done
.PHONY: build
build:
$(CONTAINER_ENGINE) build -t automated-actions:test --target test .
.PHONY: build
prod:
$(CONTAINER_ENGINE) build -t automated-actions:prod --target prod .
.PHONY: dev-env
dev-env:
uv sync --all-packages -U
.PHONY: generate-client
generate-client:
docker compose run --remove-orphans generate-automated-actions-client
docker compose down -t 1
@rm -f packages/automated_actions_client/automated_actions_client/MANIFEST.md packages/automated_actions_client/automated_actions_client/pyproject.toml
@$(MAKE) format test
.PHONY: gql-introspection
gql-introspection:
@uv run qenerate introspection http://localhost:4000/graphql > packages/automated_actions_utils/automated_actions_utils/gql_definitions/introspection.json
.PHONY: gql-query-classes
gql-query-classes:
@cd packages/automated_actions_utils/ && uv run qenerate code -i automated_actions_utils/gql_definitions/introspection.json automated_actions_utils/gql_definitions
@find packages/automated_actions_utils/automated_actions_utils/gql_definitions -path '*/__pycache__' -prune -o -type d -exec touch "{}/__init__.py" \;
.PHONY: qenerate
qenerate: gql-introspection gql-query-classes