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

:ambulance: branch name need to be set after doing modules, otherwise the variable is overwritten

parent 05689c6ad1ba
No related branches found
No related tags found
No related merge requests found
...@@ -30,19 +30,6 @@ ...@@ -30,19 +30,6 @@
pushd $project_home pushd $project_home
# determine branch name
if [ -n "$DRONE_BRANCH" ]; then
branch="$DRONE_BRANCH"
elif [ -e ".git" ]; then
branch="$(git rev-parse --abbrev-ref HEAD)"
elif [ -e ".hg" ]; then
branch="$(hg id -b)"
else
echo "${RED}WARN${RESET} - Branch name not found"
branch="unknown"
fi
echo "${YELLOW}INFO ${RESET} - Branch name: $branch"
if type "python3" > /dev/null; if type "python3" > /dev/null;
then then
odoo_modules="$(python3 -B -c "import configparser ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print (c.has_option('odoo_scripts', 'modules') and ' '.join(c.get('odoo_scripts', 'modules').split()) or '')")" odoo_modules="$(python3 -B -c "import configparser ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print (c.has_option('odoo_scripts', 'modules') and ' '.join(c.get('odoo_scripts', 'modules').split()) or '')")"
...@@ -108,6 +95,20 @@ ...@@ -108,6 +95,20 @@
done done
# super project documentation # super project documentation
# determine branch name
if [ -n "$DRONE_BRANCH" ]; then
branch="$DRONE_BRANCH"
elif [ -e ".git" ]; then
branch="$(git rev-parse --abbrev-ref HEAD)"
elif [ -e ".hg" ]; then
branch="$(hg id -b)"
else
echo "${RED}WARN${RESET} - Branch name not found"
branch="unknown"
fi
echo "${YELLOW}INFO ${RESET} - Branch name: $branch"
for doc_dir in doc docs; do for doc_dir in doc docs; do
if [[ -d "$doc_dir" ]] ; then if [[ -d "$doc_dir" ]] ; then
pushd $doc_dir pushd $doc_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