This commit is contained in:
yhaelopez
2023-12-24 12:55:39 -07:00
parent 77edc03b91
commit 7568dbc44f
2 changed files with 3 additions and 3 deletions

View File

@@ -78,10 +78,8 @@ RUN python3 -m pip install -r /tmp/requirements.txt && \
# Odoo Enterprise + Third Party Addons # # Odoo Enterprise + Third Party Addons #
#--------------------------------------------# #--------------------------------------------#
# Create third-party-addons directory and clone them # Create third-party-addons directory and clone them
RUN mkdir -p ${THIRD_PARTY_ADDONS}
COPY --chown=odoo:odoo ./odoo/clone-addons.sh / COPY --chown=odoo:odoo ./odoo/clone-addons.sh /
COPY --chown=odoo:odoo ./odoo/third-party-addons.txt / COPY --chown=odoo:odoo ./odoo/third-party-addons.txt /
# RUN /clone-addons.sh && chown odoo:odoo -R ${THIRD_PARTY_ADDONS}
RUN /clone-addons.sh RUN /clone-addons.sh
#-----------------------# #-----------------------#

View File

@@ -25,7 +25,7 @@ clone_and_copy_modules() {
# Clone and copy logic for enterprise repository # Clone and copy logic for enterprise repository
if [[ $repo_type == "enterprise" ]]; then if [[ $repo_type == "enterprise" ]]; then
if [[ ! -d "${ENTERPRISE_ADDONS}" ]] && [ -n "$GITHUB_USER" ] && [ -n "$GITHUB_ACCESS_TOKEN" ]; then if [ -n "$GITHUB_USER" ] && [ -n "$GITHUB_ACCESS_TOKEN" ]; then
$clone_cmd --depth 1 --branch ${ODOO_TAG} --single-branch --no-tags $clone_cmd --depth 1 --branch ${ODOO_TAG} --single-branch --no-tags
fi fi
else else
@@ -84,6 +84,8 @@ expand_env_vars() {
# Read the configuration file and process each line # Read the configuration file and process each line
while IFS= read -r line; do while IFS= read -r line; do
mkdir -p ${ENTERPRISE_ADDONS}
mkdir -p ${THIRD_PARTY_ADDONS}
[[ -z "$line" || "$line" == \#* ]] && continue [[ -z "$line" || "$line" == \#* ]] && continue
clone_and_copy_modules $(expand_env_vars "$line") clone_and_copy_modules $(expand_env_vars "$line")
done < "third-party-addons.txt" done < "third-party-addons.txt"