-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
201 lines (172 loc) · 6.94 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
VIRTUAL_ENV ?= venv
NODE_BIN = node_modules/.bin
SOURCE_DIRS = adhocracy-plus apps tests
ARGUMENTS=$(filter-out $(firstword $(MAKECMDGOALS)), $(MAKECMDGOALS))
SED = sed
ifneq (, $(shell command -v gsed;))
SED = gsed
endif
.PHONY: all
all: help
.PHONY: help
help:
@echo adhocracy+ development tools
@echo
@echo It will either use an exisiting virtualenv if it was entered
@echo before or create a new one in the venv subdirectory.
@echo
@echo usage:
@echo
@echo " make install -- install dev setup"
@echo " make clean -- delete node modules and venv"
@echo " make fixtures -- load example data"
@echo " make server -- start a dev server"
@echo " make watch -- start a dev server and rebuild js and css files on changes"
@echo " make background -- start background processes"
@echo " make test -- run all test cases with pytest"
@echo " make test-lastfailed -- run test that failed last"
@echo " make test-clean -- test on new database"
@echo " make coverage -- write coverage report to dir htmlcov"
@echo " make jest -- run js tests with coverage"
@echo " make jest-nocov -- run js tests without coverage"
@echo " make jest-debug -- run changed tests only, no coverage"
@echo " make jest-updateSnapshots -- update jest snapshots"
@echo " make lint -- lint all project files"
@echo " make lint-quick -- lint all files staged in git"
@echo " make lint-fix -- fix linting for all js files staged in git"
@echo " make po -- create new po files from the source"
@echo " make mo -- create new mo files from the translated po files"
@echo " make release -- build everything required for a release"
@echo " make start-postgres -- start the local postgres cluster"
@echo " make stop-postgres -- stops the local postgres cluster"
@echo " make create-postgres -- create the local postgres cluster (only works on ubuntu 20.04)"
@echo " make local-a4 -- patch to use local a4 (needs to have path ../adhocracy4)"
@echo
.PHONY: install
install:
npm install --no-save
npm run build
if [ ! -f $(VIRTUAL_ENV)/bin/python3 ]; then python3 -m venv $(VIRTUAL_ENV); fi
$(VIRTUAL_ENV)/bin/python3 -m pip install --upgrade -r requirements/dev.txt
$(VIRTUAL_ENV)/bin/python3 manage.py migrate
.PHONY: clean