Files
shields/.github/scripts/check-docusaurus-versions.sh
chris48s afc2f9093a sync docusaurus plugin versions (#9608)
* check docusaurus plugin version in CI

add CI check that fails if
docusaurus plugins are out of sync with core

* bump plugins

* provide upgrade advice
2023-09-25 13:00:49 +00:00

17 lines
465 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
# Docusaurus outputs some important errors as log messages
# but doesn't actually fail
# https://github.com/facebook/docusaurus/blob/v2.4.3/packages/docusaurus/src/server/siteMetadata.ts#L75-L92
# this script runs `docusaurus build`. If it outputs any [ERROR]s, we exit with 1
if ( npm run build 2>&1 | grep '\[ERROR\]' )
then
echo "You probably need to run: npm update @docusaurus/preset-classic"
exit 1
else
exit 0
fi