From 5ad12748c2a18caed1f989fd69dae44287af2300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 19 Jan 2024 12:16:15 +0100 Subject: [PATCH] More refactoring of oca_install_addons --- bin/oca_install_addons | 19 +++++++++++++++++++ bin/oca_install_addons__deps_and_addons_path | 17 ----------------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/bin/oca_install_addons b/bin/oca_install_addons index d1ea37c..8be911e 100755 --- a/bin/oca_install_addons +++ b/bin/oca_install_addons @@ -1,2 +1,21 @@ #!/bin/bash +set -ex + +# show pip config +pip config list + oca_install_addons__deps_and_addons_path + +# show what we have installed +pip freeze + +# Add ADDONS_DIR to addons_path. +echo "addons_path=${ADDONS_PATH},${ADDONS_DIR}" >> ${ODOO_RC} +cat ${ODOO_RC} + +deps=$(oca_list_external_dependencies deb) +if [ -n "$deps" ]; then + apt-get update -qq + # Install 'deb' external dependencies of all Odoo addons found in path. + DEBIAN_FRONTEND=noninteractive apt-get install -qq --no-install-recommends ${deps} +fi diff --git a/bin/oca_install_addons__deps_and_addons_path b/bin/oca_install_addons__deps_and_addons_path index dc1aae6..f3d3408 100755 --- a/bin/oca_install_addons__deps_and_addons_path +++ b/bin/oca_install_addons__deps_and_addons_path @@ -38,22 +38,5 @@ else fi cat test-constraints.txt -# show pip config -pip config list - # Install dependencies of addons to test. pip install -r test-requirements.txt -c test-constraints.txt - -# show what we have installed -pip freeze - -# Add ADDONS_DIR to addons_path. -echo "addons_path=${ADDONS_PATH},${ADDONS_DIR}" >> ${ODOO_RC} -cat ${ODOO_RC} - -deps=$(oca_list_external_dependencies deb) -if [ -n "$deps" ]; then - apt-get update -qq - # Install 'deb' external dependencies of all Odoo addons found in path. - DEBIAN_FRONTEND=noninteractive apt-get install -qq --no-install-recommends ${deps} -fi