Valadoc support added.
This commit is contained in:
parent
5c2762a0ef
commit
8574b2d8c1
|
@ -131,7 +131,18 @@ for i in `seq 0 $((n-1))`; do
|
||||||
# Converting Files to UTF-8 encoding
|
# Converting Files to UTF-8 encoding
|
||||||
find $TMP_PATH/$repo_dir_name \( ! -regex '.*/\..*' \) -type f -exec detect_encoding_and_convert.sh utf-8 '{}' \;
|
find $TMP_PATH/$repo_dir_name \( ! -regex '.*/\..*' \) -type f -exec detect_encoding_and_convert.sh utf-8 '{}' \;
|
||||||
|
|
||||||
|
if [ -f valadoc_env ]; then
|
||||||
|
echo "Generating documentation using Valadoc"
|
||||||
|
VALA_BASEDIR=`grep -v '\.\.' valadoc_env | grep '^BASEDIR=[-+A-z0-9. ]\+$' | cut -d= -f2`
|
||||||
|
VALA_PKGS=`grep -v '\.\.' valadoc_env | grep '^PKGS=[-+A-z0-9. ]\+$' | cut -d= -f2 | sed 's~\(^\| \)~ --pkg=~g; s~^ ~~'`
|
||||||
|
echo VALA_BASEDIR=$VALA_BASEDIR
|
||||||
|
echo VALA_PKGS=$VALA_PKGS
|
||||||
|
valadoc -o $repo_dir_name-$LAST_TAG --no-protected -b "$VALA_BASEDIR" `find "$VALA_BASEDIR" -type f -name "*.vala" -or -name '*.vapi'` $VALA_PKGS
|
||||||
|
mv $repo_dir_name-$LAST_TAG html
|
||||||
|
else
|
||||||
|
# -------- DOXYGEN --------------
|
||||||
# Generate doxygen documentation
|
# Generate doxygen documentation
|
||||||
|
echo "Generating documentation using Doxygen"
|
||||||
doxygen -g doxygen.conf
|
doxygen -g doxygen.conf
|
||||||
# Get full project name
|
# Get full project name
|
||||||
PROJECT_NAME=`mysql -h127.0.0.1 -u $MYSQL_USER --default-character-set=utf8 -e "SELECT name FROM $MYSQL_DBNAME.projects WHERE id=${project_id[$i]}" | grep -v tables_col|xargs| sed "s/ /\n/g"|tail -n+2`
|
PROJECT_NAME=`mysql -h127.0.0.1 -u $MYSQL_USER --default-character-set=utf8 -e "SELECT name FROM $MYSQL_DBNAME.projects WHERE id=${project_id[$i]}" | grep -v tables_col|xargs| sed "s/ /\n/g"|tail -n+2`
|
||||||
|
@ -176,16 +187,19 @@ for i in `seq 0 $((n-1))`; do
|
||||||
sed -i 's~$~<br>~' "$README"
|
sed -i 's~$~<br>~' "$README"
|
||||||
sed -i "/<div class=\"contents\">/r $README" html/index.html
|
sed -i "/<div class=\"contents\">/r $README" html/index.html
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Copy html to $DOC_PATH
|
# Copy html to $DOC_PATH
|
||||||
mkdir -p $DOC_PATH/${identifier[$i]}
|
mkdir -p $DOC_PATH/${identifier[$i]}
|
||||||
[ $? != 0 ] && echo "mkdir -p $DOC_PATH/${identifier[$i]} failed" && rm -rf $TMP_PATH && rm -f $DOC_PATH/${identifier[$i]}/tag && exit -1
|
[ $? != 0 ] && echo "mkdir -p $DOC_PATH/${identifier[$i]} failed" && rm -rf $TMP_PATH && rm -f $DOC_PATH/${identifier[$i]}/tag && exit -1
|
||||||
rm -rf $DOC_PATH/${identifier[$i]}/html
|
rm -rf $DOC_PATH/${identifier[$i]}/html
|
||||||
cp -r html $DOC_PATH/${identifier[$i]}
|
cp -r html $DOC_PATH/${identifier[$i]}
|
||||||
|
if [ -f Makefile ]; then
|
||||||
sed 's~\<pdflatex\>~pdflatex -interaction batchmode~g' -i latex/Makefile
|
sed 's~\<pdflatex\>~pdflatex -interaction batchmode~g' -i latex/Makefile
|
||||||
sed 's~\\usepackage{babel}~\\usepackage[russian]{babel}~' -i latex/refman.tex
|
sed 's~\\usepackage{babel}~\\usepackage[russian]{babel}~' -i latex/refman.tex
|
||||||
make -C latex -f Makefile
|
make -C latex -f Makefile
|
||||||
cp -f latex/refman.pdf $DOC_PATH/${identifier[$i]}/html/$repo_dir_name-$LAST_TAG.pdf
|
cp -f latex/refman.pdf $DOC_PATH/${identifier[$i]}/html/$repo_dir_name-$LAST_TAG.pdf
|
||||||
|
fi
|
||||||
|
|
||||||
# remove temp dir
|
# remove temp dir
|
||||||
cd $TMP_PATH
|
cd $TMP_PATH
|
||||||
|
|
Loading…
Reference in New Issue