-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 871 Bytes
/
Makefile
File metadata and controls
34 lines (26 loc) · 871 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
var/rfcs.json: var/rfc-index.xml bin/rfc-json.py
cat var/rfc-index.xml | bin/rfc-json.py > var/rfcs.json
.PHONY: refs.json
var/refs.json:
curl https://raw.githubusercontent.com/mnot/rfc-refs/main/refs.json > $@
.PHONY: var/rfc-index.xml
var/rfc-index.xml:
curl -R --etag-save $@.etag --etag-compare $@.etag "https://www.rfc-editor.org/rfc-index.xml" -o $@
tagfiles := $(wildcard src/tags/*)
var/tags.json: bin/createtags.py $(tagfiles)
python bin/createtags.py $(tagfiles) > $@
.PHONY: server
server:
python -m http.server
.PHONY: lint
lint: client.js util.js data.js *.py
standard --fix client.js util.js
black *.py
.PHONY: clean
clean:
rm -f var/rfcs.json
.PHONY: pwa-update
pwa-update:
@VERSION=$$(date +%s); \
sed -i '' "s/CACHE_NAME = 'rfcfyi-v[0-9]*'/CACHE_NAME = 'rfcfyi-v$${VERSION}'/" sw.js; \
echo "PWA cache version updated to v$${VERSION}"