forked from privacycg/nav-tracking-mitigations
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (29 loc) · 1.01 KB
/
Copy pathMakefile
File metadata and controls
35 lines (29 loc) · 1.01 KB
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
# This Makefile assumes you have a local install of bikeshed. Like any
# other Python tool, you install it with pip:
#
# pipx install bikeshed && bikeshed update
SHELL=/bin/bash -o pipefail
.PHONY: all publish clean remote
.SUFFIXES: .bs .html
all: publish
clean:
rm -rf index.html *~
publish: index.html
index.html: index.bs Makefile
bikeshed --die-on=warning spec $< $@
# Build the spec using a remote version of bikeshed.
#
# Note that the remote bikeshed tool does not support uploading images and will
# give a warning. Hence it will fail unless the warnings are allowed.
remote: index.bs
@ (HTTP_STATUS=$$(curl https://api.csswg.org/bikeshed/ \
--output index.html \
--write-out "%{http_code}" \
--header "Accept: text/plain, text/html" \
-F die-on=fatal \
-F file=@index.bs) && \
[[ "$$HTTP_STATUS" -eq "200" ]]) || ( \
echo ""; cat index.html; echo ""; \
rm -f index.html; \
exit 22 \
);