mediawiki-extensions-Multim.../docs/generate
Mark Holmquist c99d830d25 Search for jsduck warnings, fail if found
Change-Id: I21e903375e5c6fbf4cb7c7f5ca52421695618011
2014-02-12 14:19:23 -08:00

24 lines
470 B
Bash
Executable file

#!/usr/bin/env bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd $SCRIPT_DIR > /dev/null
jsduck \
--config=./jsduck-config.json \
-- \
`find ../resources/{multilightbox,mmv} -name '*.js'` \
2>&1 | tee jsduck.log \
&& echo "JSDuck execution finished."
RESULT=$?
if [ $RESULT -eq 0 ]; then
grep "^Warning:" jsduck.log > /dev/null
GREPPED=$?
if [ $GREPPED -eq 0 ]; then
RESULT=1
fi
fi
popd > /dev/null
exit $RESULT