Actualiser 1.gitclone.sh

This commit is contained in:
lpierson 2026-04-21 08:38:09 +00:00
parent 1bc6dacc8e
commit 9c8c841f5f

View file

@ -1,3 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
# Downlaod des repo OCA
#
mkdir -p ./custom
cd custom
@ -32,6 +38,33 @@ for repo in \
do
git clone -b 18.0 "$repo"
done
cd ..
# Clone de la deniere version v18 de Dockerfile pour Odoo
# recupérer le commit sur l'url
# par exemple :
# URL : https://github.com/odoo/docker/tree/b8b9102bf64e67d7baeaa410ff506dbe16fa8dfe/18.0
# Commit ! b8b9102bf64e67d7baeaa410ff506dbe16fa8dfe
#
COMMIT="b8b9102bf64e67d7baeaa410ff506dbe16fa8dfe"
BASE="https://raw.githubusercontent.com/odoo/docker/${COMMIT}/18.0"
DEST="./config-odoo/"
FILES=(Dockerfile entrypoint.sh odoo.conf wait-for-psql.py)
mkdir -p "${DEST}"
for f in "${FILES[@]}"; do
curl -fsSL "${BASE}/${f}" -o "${DEST}/${f}"
done
chmod +x "${DEST}/entrypoint.sh" "${DEST}/wait-for-psql.py"
sed -i 's/curl \\/curl vim \\/' "${DEST}/Dockerfile"
sed -i 's|^COPY \./entrypoint\.sh /$|COPY ./requirements.txt /tmp/requirements.txt\nRUN pip install --no-cache-dir --break-system-packages -r /tmp/requirements.txt\nCOPY ./entrypoint.sh /|' "${DEST}/Dockerfile"
echo "OK. ${#FILES[@]} fichiers dans ${DEST}"