-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild
executable file
·34 lines (29 loc) · 1.21 KB
/
build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# Version: v.22.05.30
SCRIPT_PATH="$(cd "$(/usr/bin/dirname "${0}")" && /bin/pwd)"
ODOO_WORK_DIR="${SCRIPT_PATH}"
. "${ODOO_WORK_DIR}/.env-default" && \
. "${ODOO_WORK_DIR}/.env-shared" && \
. "${ODOO_WORK_DIR}/.env-secret"
cd "${ODOO_WORK_DIR}"
if [ "$(id -u)" -eq 0 ]; then
/bin/echo "Please dont use sudo command with script"
exit 1
fi
#rm -fr ./auto/odoo.conf
#rm -fr ./auto/addons/*
#/bin/bash -c "$(/bin/ls -1 ./custom/src | grep -Ev 'private|repos.yaml|addons.yaml' | /usr/bin/awk '{print("rm -fr ./custom/src/" $1)}')"
if [ ! -d "${ODOO_WORK_DIR}/.venv" ]; then
/bin/echo 'run ./bootstrap first!'
exit 1
fi
# pip 20.3 has a neat depenency resolver
# https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020
. .venv/bin/activate && \
pip install --quiet "setuptools<58" && \
pip install --quiet "pip>=20.3" && \
(pip uninstall --yes -r "${ODOO_WORK_DIR}/requirements-remove-default.txt" 2>/dev/null || /bin/true) && \
pip install --quiet --exists-action w -r "${ODOO_WORK_DIR}/requirements-default.txt" && \
pip install --quiet --exists-action w -r "${ODOO_WORK_DIR}/requirements.txt" && \
"${ODOO_WORK_DIR}/common/build" && \
python "${ODOO_WORK_DIR}/common/entrypoint"