Skip to content

Commit 4643869

Browse files
committed
Fix compile script; Update repo references for bikeshed
1 parent 0b5032c commit 4643869

File tree

3 files changed

+23
-19
lines changed

3 files changed

+23
-19
lines changed

compile.sh

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
#!/bin/bash
22

3+
function run_bikeshed {
4+
echo Running bikeshed on $1
5+
if which bikeshed; then
6+
bikeshed -f spec $1
7+
else
8+
HTTP_STATUS=$(curl https://api.csswg.org/bikeshed/ \
9+
--output $2 \
10+
--write-out "%{http_code}" \
11+
--header "Accept: text/plain, text/html" \
12+
-F file=@$1)
13+
if [ "$HTTP_STATUS" -ne "200" ]; then
14+
echo ""; cat $2; echo ""
15+
rm -f $2
16+
exit 1
17+
fi
18+
fi
19+
}
20+
321
shopt -q nullglob
422
NULLGLOB_WAS_SET=$?
523
shopt -s nullglob
@@ -10,23 +28,9 @@ fi
1028

1129
set -e # Exit with nonzero exit code if anything fails
1230

13-
for SPEC in index.src.html $FILES; do
14-
echo Running bikeshed on $SPEC
15-
if which bikeshed; then
16-
bikeshed -f spec $SPEC
17-
else
18-
SPEC_OUT=${SPEC%.bs}.html
19-
HTTP_STATUS=$(curl https://api.csswg.org/bikeshed/ \
20-
--output ${SPEC_OUT} \
21-
--write-out "%{http_code}" \
22-
--header "Accept: text/plain, text/html" \
23-
-F file=@${SPEC})
24-
if [ "$HTTP_STATUS" -ne "200" ]; then
25-
echo ""; cat $SPEC_OUT; echo ""
26-
rm -f $SPEC_OUT
27-
exit 1
28-
fi
29-
fi
31+
run_bikeshed index.src.html index.html
32+
for SPEC in $FILES; do
33+
run_bikeshed $SPEC ${SPEC%.bs}.html
3034
done
3135

3236
OUTDIR=${1:-out}

index.src.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ <h1>Reporting API</h1>
1818
Indent: 2
1919
Version History: https://github.com/w3c/reporting/commits/main/index.src.html
2020
Boilerplate: omit conformance, omit feedback-header
21-
!Participate: <a href="https://github.com/w3c/reporting/issues/new">File an issue</a> (<a href="https://github.com/w3c/reporting/issues">open issues</a>)
21+
Repository: https://github.com/w3c/reporting/
2222
Markup Shorthands: css off, markdown on
2323
</pre>
2424
<pre class="anchors">

network-reporting.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Level: 1
2020
Indent: 2
2121
Version History: https://github.com/w3c/reporting/commits/master/index.src.html
2222
Boilerplate: omit conformance, omit feedback-header
23-
!Participate: <a href="https://github.com/w3c/reporting/issues/new">File an issue</a> (<a href="https://github.com/w3c/reporting/issues">open issues</a>)
23+
Repository: https://github.com/w3c/reporting/
2424
Markup Shorthands: css off, markdown on
2525
</pre>
2626
<pre class="anchors">

0 commit comments

Comments
 (0)