mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-14 01:57:02 +00:00
1944b0c6f0
It works locally because it can just nagivate to ../lib/ve.
In production however we need docs/ to be standalone so that we
can publish it without needing a subdirectory at:
https://docs.wikimedia.org/VisualEditor/master/.
For local usage this will be a symlink that still points to
the sibling directory (but using a symlink instead of a ../ path).
In production we can then instruct jenkins to replace that symlink
with an actual copy of lib/. As long as the generated path
references in the HTML remain the same.
Follows-up 88c4888872
, which broke the publication of the docs in
Jenkins as it changed references from modules/ to ../modules/ for
the eg-iframe. This works locally, but broke in Jenkins as it was relying
on the copying of modules/ to docs/modules/ being enough to make it work).
Change-Id: I10eaa5424d172932b29774a0f03d511d555fd121
25 lines
694 B
Bash
Executable file
25 lines
694 B
Bash
Executable file
#!/usr/bin/env bash
|
|
cd $(cd $(dirname $0)/..; pwd)
|
|
|
|
# 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=$?
|
|
|
|
test ! -L docs/lib && ln -s ../lib docs/lib || echo 'Symlink already exists'
|
|
|
|
cd - > /dev/null
|
|
|
|
# Exit with exit code of jsduck command
|
|
exit $ec
|