-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (45 loc) · 1.13 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
# The basic set of absolutely unopiniated "correct" settings
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -euc -o pipefail
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
.PHONY: build dev composer craft pull up install storybook
test: dev storybook
build: up
ddev exec npm run build
clean:
rm -f composer.lock
rm -rf vendor/
rm -f package-lock.json
rm -rf node_modules/
dev: build
ddev launch
ddev exec npm run serve
storybook:
ddev exec npx storybook dev --disable-telemetry -p 3001
composer: up
ddev composer \
$(filter-out $@,$(MAKECMDGOALS))
craft: up
ddev exec php craft \
$(filter-out $@,$(MAKECMDGOALS))
pull: up
ddev exec bash scripts/pull_assets.sh
ddev exec bash scripts/pull_db.sh
install: up build
ddev exec php craft setup/app-id \
$(filter-out $@,$(MAKECMDGOALS))
ddev exec php craft setup/security-key \
$(filter-out $@,$(MAKECMDGOALS))
ddev import-db --src=db-seed/seed_db.sql.gz \
$(filter-out $@,$(MAKECMDGOALS))
up:
if [ ! "$$(ddev describe | grep OK)" ]; then \
ddev auth ssh; \
ddev start; \
ddev composer install; \
ddev exec npm install; \
fi
%:
@: