-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
72 lines (55 loc) · 2.42 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.PHONY: dev-build
dev-build: ## Create the docker image for your dev environment.
time docker compose --profile dev build
.PHONY: prod-build
prod-build: ## Create the docker image for your production environment.
time docker compose --profile production build
.PHONY: dev-update-lockfile
dev-update-lockfile: ## update the yarn lockfile to add any new dependencies
build-scripts/runner yarn
.PHONY: dev-run
dev-run: ## Run a local instance of request
docker compose --profile dev up --build --remove-orphans
.PHONY: dev-run-production
dev-run-production: ## Run a local instance of request, built like it would be in production
docker compose --profile production up --build --remove-orphans
.PHONY: dev-stop ## Shutdown the running container and remove any intermediate images. Useful for when you think the container is stopped but docker doesn’t
dev-stop:
docker compose --profile dev down --remove-orphans
docker compose --profile production down --remove-orphans
.PHONY: dev-clean
dev-clean: ## Remove all the docker containers for this project
docker compose --profile dev down --rmi local --volumes
docker compose --profile production down --rmi local --volumes
.PHONY: dev-setup
dev-setup:
build-scripts/git-hooks
.PHONY: dev-ssh
dev-ssh: ## Open a shell on the current running docker image of the project
docker compose exec dev zsh
.PHONY: dev-shell
dev-shell: ## Creates a shell in the project container, does not connect to a running instance. Use dev-ssh for that.
docker compose run --rm deps zsh
.PHONY: dev-test
dev-test: ## Run all the tests
time build-scripts/runner yarn test
.PHONY: dev-test-coverage
dev-test-coverage: ## Run all the tests, and generate a coverage report
time build-scripts/runner dev test --coverage
.PHONY: dev-test-watch
dev-test-watch: ## Start Jest in watch mode (and generate coverage reports)
build-scripts/runner dev test --watch --coverage --changedSince=master
.PHONY: dev-lint
dev-lint: ## Run the linter on staged files
build-scripts/runner dev lint
.PHONY: dev-snapshots
dev-snapshots: ## Build the snapshots for the snapshot tests
build-scripts/runner dev test -u ${SNAP}
.PHONY: dev-docs
dev-docs: ## Run jsdoc
build-scripts/runner yarn docs:build
build-scripts/runner yarn docs:start -p 9004
.PHONY: help
help: ## This message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help