-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
76 lines (55 loc) · 1.22 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
73
74
75
76
APP_ENV := dev
APP_OUTPUT_DIR := output_dev
APP_URL := homepage.site
APP_NPM_BUILD_CMD := build
ifeq ($(TARGET), prod)
APP_ENV := prod
APP_OUTPUT_DIR := output_prod
APP_URL := https://vakhrushev.me
APP_NPM_BUILD_CMD := build-prod
endif
# Installation
install: build-docker install-php-deps install-js-deps
build-docker:
./tools/build-docker
install-php-deps:
./tools/composer install --no-interaction
install-js-deps:
./tools/npm ci
# Building
clean:
rm -rf ./${APP_OUTPUT_DIR}/*
build-assets:
./tools/npm run "${APP_NPM_BUILD_CMD}"
build-site:
./tools/sculpin generate \
--env="${APP_ENV}" \
--url="${APP_URL}" \
--no-interaction \
-vv
build: clean build-assets build-site
build-prod:
$(MAKE) build TARGET=prod
# Format
format-pages:
./tools/npm run format-md
format-assets:
./tools/npm run format-webpack
./tools/npm run format-js
./tools/npm run format-vue
./tools/npm run format-style
format-php:
./tools/php-cs-fixer fix
format: format-pages format-assets format-php
watch: clean build-assets
./tools/sculpin generate \
--env="${APP_ENV}" \
--watch \
--server \
--port=8000 \
--no-interaction
# Deploy
deploy: build-prod
invoke deploy
rollback:
./tools/dep rollback production -vv