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

:pencil: fix and improve super project documentation generation

parent e84b9fa38533
No related branches found
No related tags found
1 merge request!83📝 fix and improve super project documentation generation
......@@ -59,7 +59,7 @@
pushd $module_path
module=$(basename $module_path)
has_doc=""
if [ -e ".git" ]; then
if [ -e ".git" ] || [ -e "../.git" ]; then
branch="$(git rev-parse --abbrev-ref HEAD)"
elif [ -e ".hg" ]; then
branch="$(hg identify --branch)"
......@@ -99,5 +99,5 @@
rsync --recursive --copy-links --perms --times --group --owner $doc_dir/ "$superproject_modules_doc/$module"
# generate autotodo for each module (to update pathes)
if [[ -e $doc_dir/autotodo.py ]] ; then
echo "${INFO} running autotodo again from different path $superproject_modules_doc/$module for ${project_home}/${module_path}"
echo "${INFO} running autotodo again from different path $superproject_modules_doc/$module for ${module_path}"
pushd "$superproject_modules_doc/$module"
......@@ -103,8 +103,8 @@
pushd "$superproject_modules_doc/$module"
./autotodo.py $(realpath --relative-to="." "${project_home}/${module_path}") .py TODO,FIXME,XXX
./autotodo.py $(realpath --relative-to="." "${module_path}") .py TODO,FIXME,XXX
popd
fi
# TODO translation will not work when copying like that.
fi
done
if [[ -z "$has_doc" ]] ; then
......@@ -105,10 +105,10 @@
popd
fi
# TODO translation will not work when copying like that.
fi
done
if [[ -z "$has_doc" ]] ; then
echo ${WARN} - Missing documentation for $module_path
echo ${WARN} Missing documentation for $module_path
fi
popd
fi
......@@ -119,8 +119,10 @@
echo "${INFO} ${WHITE_BOLD}Super project${RESET} documentation generation"
# determine branch name
if [ -n "$DRONE_BRANCH" ]; then
branch="$DRONE_BRANCH"
if [ -n "$CI_COMMIT_HG_BRANCH" ]; then
branch="$CI_COMMIT_HG_BRANCH"
elif [ -n "$CI_COMMIT_BRANCH" ]; then
branch="$CI_COMMIT_BRANCH"
elif [ -e ".git" ]; then
branch="$(git rev-parse --abbrev-ref HEAD)"
elif [ -e ".hg" ]; then
......
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