mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-01 09:26:37 +00:00
c42840541e
Adding a symlink in .docs/generate.sh because of Jenkins and possibly other uses. Change-Id: Ieb56852d0d0b978fbc1cbb873204d9e457cf969c
39 lines
1 KiB
Bash
Executable file
39 lines
1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
cd $(cd $(dirname $0)/..; pwd)
|
|
|
|
(
|
|
while IFS='' read -r l
|
|
do
|
|
if [[ "$l" == "{{VE-LOAD-HEAD}}" ]]
|
|
then
|
|
php maintenance/makeStaticLoader.php --fixdir --section=head --ve-path=../modules/ $*
|
|
elif [[ "$l" == "{{VE-LOAD-BODY}}" ]]
|
|
then
|
|
php maintenance/makeStaticLoader.php --fixdir --section=body --ve-path=../modules/ $*
|
|
else
|
|
echo "$l"
|
|
fi
|
|
done
|
|
) < .docs/eg-iframe.tpl | php > .docs/eg-iframe.html
|
|
|
|
# allow custom path to jsduck, or custom version (eg JSDUCK=jsduck _4.10.4_)
|
|
JSDUCK=${JSDUCK:-jsduck}
|
|
|
|
# Support jsduck 4.x and 5.x
|
|
jsduckver="$($JSDUCK --version | sed -e 's/[.].*//')"
|
|
if [ "$jsduckver" = "JSDuck 4" ]; then
|
|
jsduckopt="--meta-tags .docs/MetaTags.rb"
|
|
else
|
|
jsduckopt="--tags .docs/CustomTags.rb"
|
|
fi
|
|
|
|
# Disable parallel processing which seems to be causing problems under Ruby 1.8
|
|
$JSDUCK --config .docs/config.json $jsduckopt --processes 0 --color --warnings-exit-nonzero
|
|
ec=$?
|
|
|
|
rm .docs/eg-iframe.html
|
|
cd - > /dev/null
|
|
|
|
# Exit with exit code of jsduck command
|
|
exit $ec
|