-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (28 loc) · 995 Bytes
/
Makefile
File metadata and controls
36 lines (28 loc) · 995 Bytes
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
ALL = www postprocess
.PHONY : all
all : $(ALL)
serve : www
cd www && python3 -m http.server
.PHONY : postprocess
postprocess : www
yarn react-snap
- rm $^/200.html
find www -path '*.htm' -o -path '*.html' -exec node scripts/postprocess.js {} +
www : node_modules pages/home/build pages/addons/ctf
mkdir -p $@/addons
cp -r pages/home/build/* www/
cp -r pages/addons/ctf/packages/landing/build $@/addons/ctf
pages/home/build :
cd pages/home && yarn --frozen-lockfile && yarn build
pages/addons/ctf :
mkdir -p $@
curl -H "Authorization: token $$GITHUB_TOKEN" -L https://api.github.com/repos/nilfalse/ctf/tarball | tar --strip-components 1 -xz -C $@
cd $@/packages/landing && yarn --frozen-lockfile
cd $@/packages/landing && SKIP_PREFLIGHT_CHECK=true PUBLIC_URL=/addons/ctf yarn react-scripts build
node_modules :
yarn --frozen-lockfile
.PHONY : clean distclean
clean :
-rm -rf www pages/home/build
distclean : clean
-rm -rf node_modules pages/home/node_modules pages/addons