-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (39 loc) · 1.18 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
# cat -e -t -v Makefile
DOCKER_COMMAND = docker run --rm -u $(shell id -u) -v ${PWD}:/code -w /code
.PHONY: default
default: up
.PHONY: install
install:
docker compose run web npm install
git config --local core.hooksPath .githooks/
.PHONY: lint
lint:
docker compose run -T web sh scripts/lint.sh
.PHONY: up
up:
docker compose up
.PHONY: clean
clean:
rm -rf dist/
dist:
docker compose build web
docker compose run -T -v /code/node_modules web npm run build
.PHONY: get-cypress-version
get-cypress-version:
$(eval CYPRESS_VERSION=$(shell docker compose run web npm list cypress --depth=0 -p -l | cut -d'@' -f2))
.PHONY: test
test: get-cypress-version
$(DOCKER_COMMAND) --ipc=host \
--add-host host.docker.internal:host-gateway \
--entrypoint cypress \
cypress/included:$(CYPRESS_VERSION) run \
--config baseUrl=http://host.docker.internal:3000
.PHONY: test-email
test-email: get-cypress-version
$(DOCKER_COMMAND) --ipc=host \
--add-host host.docker.internal:host-gateway \
--entrypoint cypress \
cypress/included:$(CYPRESS_VERSION) run \
--config baseUrl=http://host.docker.internal:3000
i18n-extract:
docker compose run -T -v /code/node_modules web npm run i18n:extract