File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ set -o pipefail
77cd " $( dirname " $0 " ) "
88DIR=$( pwd)
99
10+ # The latest required version of Bikeshed. Update this if the build depends on
11+ # new features or bugfixes in Bikeshed.
12+ BIKESHED_LATEST=" 5.4.0"
13+
1014# The latest required version of Wattsi. Update this if you change how ./build.sh invokes Wattsi;
1115# it will cause a warning if Wattsi's self-reported version is lower. Note that there's no need to
1216# update this on every revision of Wattsi; only do so when a warning is justified.
@@ -86,7 +90,9 @@ function main {
8690 exit 0
8791 fi
8892
89- if [[ $USE_BIKESHED != " true" ]]; then
93+ if [[ $USE_BIKESHED == " true" ]]; then
94+ checkBikeshed
95+ else
9096 checkWattsi
9197 ensureHighlighterInstalled
9298
@@ -747,6 +753,24 @@ Disallow: /review-drafts/" > "$HTML_OUTPUT/robots.txt"
747753 fi
748754}
749755
756+ # Checks if Bikeshed is available and up to date
757+ # - Arguments: none
758+ # - Output:
759+ # - Will echo any errors and exit the script with error code 1 if the required
760+ # version is not available.
761+ function checkBikeshed {
762+ if hash bikeshed 2> /dev/null; then
763+ BIKESHED_INSTALLED=$( bikeshed --version)
764+ if ! printf " %s\n%s" " $BIKESHED_LATEST " " $BIKESHED_INSTALLED " | sort -V -C; then
765+ echo " Error: bikeshed version $BIKESHED_LATEST or newer is required."
766+ exit 1
767+ fi
768+ else
769+ echo " Error: bikeshed is required."
770+ exit 1
771+ fi
772+ }
773+
750774# Checks if Wattsi is available and up to date
751775# - Arguments: none
752776# - Output:
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Text Macro: TWITTER htmlstandard
1010Text Macro: LATESTRD 2025-01
1111Abstract: HTML is Bikeshed.
1212Indent: 1
13- Markup Shorthands: css off
13+ Markup Shorthands: css off, markdown-block off
1414Complain About: accidental-2119 off, missing-example-ids off
1515Include MDN Panels: false
1616</pre>` ;
You can’t perform that action at this time.
0 commit comments