File tree Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Original file line number Diff line number Diff line change 1
- sudo : false
2
- language : python
1
+ language : generic
3
2
python :
4
3
- ' 2.7'
5
- install :
6
- - pip install pygments lxml setuptools --upgrade
7
- - git clone https://github.com/tabatkins/bikeshed.git
8
- - pip install --editable $PWD/bikeshed
9
- - bikeshed update
10
4
script :
11
5
- bash "./deploy.sh"
12
6
env :
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e # Exit with nonzero exit code if anything fails
3
3
4
- cd docs && bikeshed spec
4
+ INPUT_FILE=$( find . -maxdepth 2 -name " *.bs" -print -quit)
5
+
6
+ curlretry () {
7
+ curl --retry 2 " $@ "
8
+ }
9
+
10
+ curlbikeshed () {
11
+ # The Accept: header ensures we get the error output even when warnings are produced, per
12
+ # https://github.com/whatwg/whatwg.org/issues/227#issuecomment-419969339.
13
+ HTTP_STATUS=$( curlretry https://api.csswg.org/bikeshed/ \
14
+ --output " $1 " \
15
+ --write-out " %{http_code}" \
16
+ --header " Accept: text/plain, text/html" \
17
+ -F die-on=error \
18
+ -F file=@" $INPUT_FILE " \
19
+ " ${@: 2} " )
20
+
21
+ if [[ " $HTTP_STATUS " != " 200" ]]; then
22
+ cat " $1 "
23
+ rm -f " $1 "
24
+ exit 22
25
+ fi
26
+ }
27
+
28
+ curlbikeshed " index.html"
5
29
6
30
if [ -d out ]; then
7
31
echo Copy the generated spec into out/index.html
You can’t perform that action at this time.
0 commit comments