-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
54 lines (39 loc) · 1.33 KB
/
Makefile
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
.PHONY: build help
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
install: package.json ## install dependencies
@if [ "$(CI)" != "true" ]; then \
echo "Full install..."; \
yarn; \
fi
@if [ "$(CI)" = "true" ]; then \
echo "Frozen install..."; \
yarn --frozen-lockfile; \
fi
build-ra-keycloak:
@echo "Transpiling ra-keycloak files...";
@cd ./packages/ra-keycloak && yarn -s build
build-demo:
@echo "Transpiling demo files...";
@cd ./packages/demo && yarn -s build
build: build-ra-keycloak build-demo ## compile ES6 files to JS
lint: ## lint the code and check coding conventions
@echo "Running linter..."
@yarn -s lint
prettier: ## prettify the source code using prettier
@echo "Running prettier..."
@yarn -s prettier
test: build test-unit lint ## launch all tests
test-unit: ## launch unit tests
echo "Running unit tests...";
yarn -s test-unit;
run-demo:
@cd ./packages/demo && yarn dev
run: keycloak-start run-demo
DOCKER_COMPOSE = docker compose -p ra-keycloak -f ./packages/demo/docker-compose.yml
keycloak-start: ## Start the project with docker.
$(DOCKER_COMPOSE) up --force-recreate -d
keycloak-logs: ## Display logs
$(DOCKER_COMPOSE) logs -f
keycloak-stop: ## Stop the project with docker.
$(DOCKER_COMPOSE) down