@@ -15,6 +15,7 @@ declare -r WATTSI_LATEST=140
15
15
# Shared state variables throughout this script
16
16
LOCAL_WATTSI=true
17
17
WATTSI_RESULT=0
18
+ USE_BIKESHED=false
18
19
DO_UPDATE=true
19
20
DO_LINT=true
20
21
DO_HIGHLIGHT=true
@@ -37,6 +38,7 @@ HTML_GIT_CLONE_OPTIONS=${HTML_GIT_CLONE_OPTIONS:-"--depth=2"}
37
38
38
39
# This is used by child scripts, and so we export it
39
40
export HTML_CACHE
41
+ export USE_BIKESHED
40
42
41
43
# Used specifically when the Dockerfile calls this script
42
44
SKIP_BUILD_UPDATE_CHECK=${SKIP_BUILD_UPDATE_CHECK:- false}
@@ -85,14 +87,16 @@ function main {
85
87
exit 0
86
88
fi
87
89
88
- checkWattsi
89
- ensureHighlighterInstalled
90
+ if [[ $USE_BIKESHED != " true" ]]; then
91
+ checkWattsi
92
+ ensureHighlighterInstalled
90
93
91
- doLint
94
+ doLint
92
95
93
- updateRemoteDataFiles
96
+ updateRemoteDataFiles
94
97
95
- startHighlightServer
98
+ startHighlightServer
99
+ fi
96
100
97
101
processSource " source" " default"
98
102
@@ -146,6 +150,7 @@ function processCommandLineArgs {
146
150
echo " $0 help Show this usage statement."
147
151
echo
148
152
echo " Build options:"
153
+ echo " -b|--bikeshed Use Bikeshed instead of Wattsi. (experimental)"
149
154
echo " -d|--docker Use Docker to build in a container."
150
155
echo " -r|--remote Use the build server."
151
156
echo " -s|--serve After building, serve the results on http://localhost:$SERVE_PORT ."
@@ -176,6 +181,9 @@ function processCommandLineArgs {
176
181
DO_HIGHLIGHT=false
177
182
SINGLE_PAGE_ONLY=true
178
183
;;
184
+ -b|--bikeshed)
185
+ USE_BIKESHED=true
186
+ ;;
179
187
-d|--docker)
180
188
USE_DOCKER=true
181
189
;;
@@ -663,27 +671,33 @@ function processSource {
663
671
cargo run " ${cargo_args[@]} " < " $HTML_SOURCE /$source_location " > " $HTML_TEMP /source-whatwg-complete"
664
672
fi
665
673
666
- runWattsi " $HTML_TEMP /source-whatwg-complete" " $HTML_TEMP /wattsi-output"
667
- if [[ $WATTSI_RESULT == " 0" ]]; then
668
- if [[ $LOCAL_WATTSI != " true" ]]; then
669
- " $QUIET " || grep -v ' ^$' " $HTML_TEMP /wattsi-output.txt" # trim blank lines
670
- fi
674
+ if [[ $USE_BIKESHED == " true" ]]; then
675
+ echo " BIKESHED!!!"
676
+ bikeshed spec --byos " $HTML_TEMP /source-whatwg-complete" " $HTML_TEMP /bikeshed-output" --md-Text-Macro=" SHA $HTML_SHA "
677
+ exit 0
671
678
else
672
- if [[ $LOCAL_WATTSI != " true" ]]; then
673
- " $QUIET " || grep -v ' ^$' " $HTML_TEMP /wattsi-output.txt" # trim blank lines
674
- fi
675
- if [[ $WATTSI_RESULT == " 65" ]]; then
676
- echo
677
- echo " There were errors. Running again to show the original line numbers."
678
- echo
679
- runWattsi " $HTML_SOURCE /$source_location " " $HTML_TEMP /wattsi-raw-source-output"
679
+ runWattsi " $HTML_TEMP /source-whatwg-complete" " $HTML_TEMP /wattsi-output"
680
+ if [[ $WATTSI_RESULT == " 0" ]]; then
680
681
if [[ $LOCAL_WATTSI != " true" ]]; then
681
- grep -v ' ^$' " $HTML_TEMP /wattsi-output.txt" # trim blank lines
682
+ " $QUIET " || grep -v ' ^$' " $HTML_TEMP /wattsi-output.txt" # trim blank lines
682
683
fi
684
+ else
685
+ if [[ $LOCAL_WATTSI != " true" ]]; then
686
+ " $QUIET " || grep -v ' ^$' " $HTML_TEMP /wattsi-output.txt" # trim blank lines
687
+ fi
688
+ if [[ $WATTSI_RESULT == " 65" ]]; then
689
+ echo
690
+ echo " There were errors. Running again to show the original line numbers."
691
+ echo
692
+ runWattsi " $HTML_SOURCE /$source_location " " $HTML_TEMP /wattsi-raw-source-output"
693
+ if [[ $LOCAL_WATTSI != " true" ]]; then
694
+ grep -v ' ^$' " $HTML_TEMP /wattsi-output.txt" # trim blank lines
695
+ fi
696
+ fi
697
+ echo
698
+ echo " There were errors. Stopping."
699
+ exit " $WATTSI_RESULT "
683
700
fi
684
- echo
685
- echo " There were errors. Stopping."
686
- exit " $WATTSI_RESULT "
687
701
fi
688
702
689
703
# Keep the list of files copied from $HTML_SOURCE in sync with `doServerBuild`
0 commit comments