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
This commit is part of merge request !83. Comments created here will be created in the context of that merge request.
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
pushd $module_path pushd $module_path
module=$(basename $module_path) module=$(basename $module_path)
has_doc="" has_doc=""
if [ -e ".git" ]; then if [ -e ".git" ] || [ -e "../.git" ]; then
branch="$(git rev-parse --abbrev-ref HEAD)" branch="$(git rev-parse --abbrev-ref HEAD)"
elif [ -e ".hg" ]; then elif [ -e ".hg" ]; then
branch="$(hg identify --branch)" branch="$(hg identify --branch)"
...@@ -99,5 +99,5 @@ ...@@ -99,5 +99,5 @@
rsync --recursive --copy-links --perms --times --group --owner $doc_dir/ "$superproject_modules_doc/$module" rsync --recursive --copy-links --perms --times --group --owner $doc_dir/ "$superproject_modules_doc/$module"
# generate autotodo for each module (to update pathes) # generate autotodo for each module (to update pathes)
if [[ -e $doc_dir/autotodo.py ]] ; then 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" pushd "$superproject_modules_doc/$module"
...@@ -103,8 +103,8 @@ ...@@ -103,8 +103,8 @@
pushd "$superproject_modules_doc/$module" 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 popd
fi fi
# TODO translation will not work when copying like that. # TODO translation will not work when copying like that.
fi fi
done done
if [[ -z "$has_doc" ]] ; then if [[ -z "$has_doc" ]] ; then
...@@ -105,10 +105,10 @@ ...@@ -105,10 +105,10 @@
popd popd
fi fi
# TODO translation will not work when copying like that. # TODO translation will not work when copying like that.
fi fi
done done
if [[ -z "$has_doc" ]] ; then if [[ -z "$has_doc" ]] ; then
echo ${WARN} - Missing documentation for $module_path echo ${WARN} Missing documentation for $module_path
fi fi
popd popd
fi fi
...@@ -119,8 +119,10 @@ ...@@ -119,8 +119,10 @@
echo "${INFO} ${WHITE_BOLD}Super project${RESET} documentation generation" echo "${INFO} ${WHITE_BOLD}Super project${RESET} documentation generation"
# determine branch name # determine branch name
if [ -n "$DRONE_BRANCH" ]; then if [ -n "$CI_COMMIT_HG_BRANCH" ]; then
branch="$DRONE_BRANCH" branch="$CI_COMMIT_HG_BRANCH"
elif [ -n "$CI_COMMIT_BRANCH" ]; then
branch="$CI_COMMIT_BRANCH"
elif [ -e ".git" ]; then elif [ -e ".git" ]; then
branch="$(git rev-parse --abbrev-ref HEAD)" branch="$(git rev-parse --abbrev-ref HEAD)"
elif [ -e ".hg" ]; then 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