-
Notifications
You must be signed in to change notification settings - Fork 13
/
makefile
46 lines (32 loc) · 1.28 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
.PHONY: build help
export UID=$(shell id -u)
export GID=$(shell id -g)
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
install: ## install dependencies with docker
@docker-compose run --rm gatsby npm install
run: ## run gatsby in develop mode with docker
@docker-compose up
start: ## run gatsby in develop mode with docker
@docker-compose up -d
stop: ## stop gatsby in docker
@docker-compose down
connect: ## start bash in the node container
@docker-compose exec gatsby ash
logs: ## Display logs from docker
@docker-compose logs -f
build: ## build site with docker
@docker-compose run --rm gatsby npm run build
test: test-unit ## launch test unit and e2e
test-unit: ## launch test unit
@echo " " && echo "** Start tests unit"
@docker-compose run --rm gatsby npm run test
test-unit-watch: ## launch test unit in watch mode
@docker-compose run --rm gatsby npm run test:watch
test-e2e: ## launch test e2e
@echo " " && echo "** Start tests e2e"
@make build # > /dev/null 2>&1
@docker-compose -f docker-compose-test.yml run --rm e2e
@docker-compose -f docker-compose-test.yml down
deploy: build ## Deploy static site
rsync -avz --delete public/ caencamp:/home/websites/caencamp/www/