summaryrefslogtreecommitdiff
path: root/maintenance/mwjsduck-gen
blob: 5247637bb127f35d4e8dae616bdb4873ec9ad4ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash
set -e

JSDUCK_MWVERSION=master
if [[ "$1" == "--version" && "$2" != "" ]]
then
	JSDUCK_MWVERSION="$2"
elif [[ "$*" != "" ]]
then
	FILENAME=$(basename $0)
	echo "Usage: $FILENAME [--version <mediawiki version>]"
	echo
	exit 1
fi

MWCORE_DIR=$(cd $(dirname $0)/..; pwd)

jsduck \
--config=$MWCORE_DIR/maintenance/jsduck/config.json \
--footer="Documentation for branch ($JSDUCK_MWVERSION) on {DATE} by {JSDUCK} {VERSION}." \
--processes 0

echo 'JSDuck execution finished.'

ln -s ../../resources $MWCORE_DIR/docs/js/modules