Skip to content
Snippets Groups Projects
Commit 26243c4996c0 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

correctly get branch name (.git/hg are in the module directory), and use...

correctly get branch name (.git/hg are in the module directory), and use default if no branch information available
parent 63cf5d2ab703
No related branches found
No related tags found
No related merge requests found
......@@ -65,9 +65,16 @@
for doc_dir in doc docs ; do
if [[ -d $doc_dir && -e $doc_dir/Makefile ]]; then
echo ${YELLOW}INFO ${RESET} - Makefile found in $dir/$module/$doc_dir
if [ -e ".git" ]; then
branch="$(git rev-parse --abbrev-ref HEAD)"
elif [ -e ".hg" ]; then
branch="$(hg id -b)"
else
branch="default"
fi
pushd $doc_dir
# TODO read value from Makefile
for language in "en" ; do
make -e SPHINXOPTS=-Dlanguage=${language} $format
# TODO read value from Makefile
builddir=_build
......@@ -68,14 +75,9 @@
pushd $doc_dir
# TODO read value from Makefile
for language in "en" ; do
make -e SPHINXOPTS=-Dlanguage=${language} $format
# TODO read value from Makefile
builddir=_build
if [ -e ".git" ]; then
branch="$(git rev-parse --abbrev-ref HEAD)"
elif [ -e ".hg" ]; then
branch="$(hg id -b)"
fi
dest_dir=$out_dir/$module/$language/$branch
if [[ $? -eq 0 ]] ; then
echo ${YELLOW}INFO ${RESET} - Documentation generation done for $dir/$module/$doc_dir, copy to $dest_dir
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment