[FIX] docker script: support docker name with - and _

This commit is contained in:
Mathieu Benoit 2024-04-23 00:00:27 -04:00
parent 81c4528b57
commit 69733c3941
5 changed files with 44 additions and 5 deletions

View file

@ -7,4 +7,9 @@ BASENAME="${BASENAME//./}"
# Lowercase
BASENAME="${BASENAME,,}"
docker exec -u root -ti ${BASENAME}_ERPLibre_1 bash
docker exec -u root -ti ${BASENAME}-ERPLibre-1 bash
retVal=$?
if [[ $retVal -ne 0 ]]; then
docker exec -u root -ti ${BASENAME}_ERPLibre_1 bash
fi

View file

@ -7,7 +7,15 @@ BASENAME="${BASENAME//./}"
# Lowercase
BASENAME="${BASENAME,,}"
docker exec -u root -ti ${BASENAME}_ERPLibre_1 /bin/bash -c "\
docker exec -u root -ti ${BASENAME}-ERPLibre-1 /bin/bash -c "\
cd /ERPLibre; \
./docker/repo_manifest_gen_org_prefix_path.py /ERPLibre/addons /etc/odoo/odoo.conf /etc/odoo/odoo.conf; \
"
retVal=$?
if [[ $retVal -ne 0 ]]; then
docker exec -u root -ti ${BASENAME}_ERPLibre_1 /bin/bash -c "\
cd /ERPLibre; \
./docker/repo_manifest_gen_org_prefix_path.py /ERPLibre/addons /etc/odoo/odoo.conf /etc/odoo/odoo.conf; \
"
fi

View file

@ -7,7 +7,15 @@ BASENAME="${BASENAME//./}"
# Lowercase
BASENAME="${BASENAME,,}"
docker exec -u root -ti ${BASENAME}_ERPLibre_1 /bin/bash -c "\
docker exec -u root -ti ${BASENAME}-ERPLibre-1 /bin/bash -c "\
cd /ERPLibre; \
time make db_list; \
"
retVal=$?
if [[ $retVal -ne 0 ]]; then
docker exec -u root -ti ${BASENAME}_ERPLibre_1 /bin/bash -c "\
cd /ERPLibre; \
time make db_list; \
"
fi

View file

@ -7,7 +7,15 @@ BASENAME="${BASENAME//./}"
# Lowercase
BASENAME="${BASENAME,,}"
docker exec -u root -ti ${BASENAME}_ERPLibre_1 /bin/bash -c "\
docker exec -u root -ti ${BASENAME}-ERPLibre-1 /bin/bash -c "\
cd /ERPLibre; \
time make test; \
"
retVal=$?
if [[ $retVal -ne 0 ]]; then
docker exec -u root -ti ${BASENAME}_ERPLibre_1 /bin/bash -c "\
cd /ERPLibre; \
time make test; \
"
fi

View file

@ -7,9 +7,19 @@ BASENAME="${BASENAME//./}"
# Lowercase
BASENAME="${BASENAME,,}"
docker exec -u root -ti ${BASENAME}_ERPLibre_1 /bin/bash -c "\
docker exec -u root -ti ${BASENAME}-ERPLibre-1 /bin/bash -c "\
cd /ERPLibre; \
./.venv/repo forall -pc 'git status -s'; \
echo ''; \
git status -s; \
"
retVal=$?
if [[ $retVal -ne 0 ]]; then
docker exec -u root -ti ${BASENAME}_ERPLibre_1 /bin/bash -c "\
cd /ERPLibre; \
./.venv/repo forall -pc 'git status -s'; \
echo ''; \
git status -s; \
"
fi