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

[create_documentation] use branch name (compatible with hg/git)

parent d9b0b4161f40
No related branches found
No related tags found
No related merge requests found
......@@ -38,8 +38,11 @@
make -e SPHINXOPTS=-Dlanguage=${language} $format
# TODO read value from Makefile
builddir=_build
# TODO read value from hg/git
branch=default
if [ -e ".git" ]; then
branch="$(git rev-parse --abbrev-ref HEAD)"
elif [ -e ".hg" ]; then
branch="$(hg id -b)"
fi
dest_dir=$out_dir/$project_name/$language/$branch
if [[ $? -eq 0 ]] ; then
echo "${YELLOW}INFO ${RESET} - Documentation generation done for $doc_dir (superproject), copy to $dest_dir"
......@@ -68,8 +71,11 @@
make -e SPHINXOPTS=-Dlanguage=${language} $format
# TODO read value from Makefile
builddir=_build
# TODO read value from hg/git
branch=default
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