-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
167 lines (138 loc) · 5.8 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
###############################################################################
###############################################################################
## ##
## Sitegeist Neos Base Distribution ##
## ##
###############################################################################
###############################################################################
#
# @author Wilhelm Behncke <[email protected]>
# @author Bernhard Schmitt <[email protected]>
# @author Andreas Freund <[email protected]>
# @author Masoud Hedayati <[email protected]>
# @author Martin Ficzel <[email protected]>
# @author Dogan Günaydin <[email protected]>
#
###############################################################################
# VARIABLES #
###############################################################################
SHELL=/bin/bash
###############################################################################
# README #
###############################################################################
.DEFAULT:
readme::
@printf "\n"
@printf "\t\t\033[0;1mSitegeist Neos Base Distribution\033[0m\n"
@printf "\n"
@printf " Available Targets\n"
@printf " --------------------------------------------------------------------\n"
@printf "\033[0;1m install \033[0m \t Install the project\n"
@printf "\033[0;1m cleanup \033[0m \t Cleanup all files and make a fresh install\n"
@printf "\033[0;1m lint \033[0m \t\t Lint all sources\n"
@printf "\033[0;1m build \033[0m \t Build Frontend\n"
@printf "\033[0;1m watch \033[0m \t Build Frontend (Watch Mode)\n"
@printf "\033[0;1m up \033[0m \t\t Start a development server\n"
@printf "\033[0;1m down \033[0m \t\t Stop the development server\n"
@printf "\033[0;1m prune \033[0m \t Stop the development server and remove all traces of it\n"
@printf "\033[0;1m restart \033[0m \t Restart the development server\n"
@printf "\033[0;1m logs \033[0m \t\t Show logs from the development server\n"
@printf "\033[0;1m ssh \033[0m \t\t Start a shell on the development server\n"
@printf "\033[0;1m ssh-mariadb \033[0m \t Run the mariadb client on the development server\n"
@printf "\033[0;1m clone \033[0m \t Clone data from a deployed instance\n"
@printf "\n"
###############################################################################
# INSTALL & CLEANUP #
###############################################################################
environment::
@ddev version
@echo mkcert $$(mkcert -version)
@ddev exec composer --version
@echo Node $$(ddev exec node --version)
@echo Yarn $$(ddev yarn --version)
install-githooks::
@if [ -z $${CI+x} ]; then touch ./.git/hooks/pre-commit && \
echo "#!/bin/sh" > ./.git/hooks/pre-commit && \
echo "make lint" >> ./.git/hooks/pre-commit && \
chmod +x ./.git/hooks/pre-commit; fi
install-composer::
@ddev composer install
install-yarn::
@ddev yarn
@ddev flow flow:package:rescan
install::
@mkdir -p Data/Logs
@$(MAKE) -s install-githooks
@$(MAKE) -s install-composer
@$(MAKE) -s install-yarn
@$(MAKE) -s flush
flush::
@ddev composer flush
remove-artifacts:
@ddev exec find ./DistributionPackages/ -type f -name '*.js.fusion' -delete
@ddev exec find ./DistributionPackages/ -type f -name '*.css.fusion' -delete
cleanup::
@ddev composer cleanup:php
@ddev yarn cleanup:node
@$(MAKE) -s remove-artefacts
###############################################################################
# LINTING & QA #
###############################################################################
lint-editorconfig::
@echo "Lint .editorconfig"
@ddev composer lint:editorconfig
lint-php::
@echo "Lint PHP Sources".
@ddev composer lint
lint-fe::
@echo "Lint CSS/TS Sources"
@ddev yarn lint
lint::
@$(MAKE) -s lint-editorconfig
@$(MAKE) -s lint-php
@$(MAKE) -s lint-fe
test::
@echo "Lint CSS/TS Sources"
@ddev composer test
@ddev yarn test
###############################################################################
# FRONTEND BUILD #
###############################################################################
build::
@ddev yarn build
watch::
@ddev yarn watch
###############################################################################
# DDEV #
###############################################################################
up::
@ddev start
down::
@ddev stop --unlist
prune::
@ddev delete --omit-snapshot
restart::
@ddev restart
logs::
@ddev logs -f
###############################################################################
# SSH #
###############################################################################
ssh::
@ddev ssh
ssh-mariadb::
@ddev mysql
###############################################################################
# CLONE #
###############################################################################
clone::
@ddev composer clone
###############################################################################
# DEPLOYMENT #
###############################################################################
deploy-develop::
@ddev composer deploy:develop
deploy-staging::
@ddev composer deploy:staging
deploy-master::
@ddev composer deploy:master