forked from sunflowerit/waftlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild
executable file
·30 lines (25 loc) · 868 Bytes
/
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
#!/bin/sh
SCRIPT_PATH=$(cd "$(/usr/bin/dirname "$0")" && /bin/pwd)
ODOO_WORK_DIR=$SCRIPT_PATH
. $SCRIPT_PATH/.env-shared && \
. $SCRIPT_PATH/.env-secret
cd $ODOO_WORK_DIR
if [ $(id -u) -eq 0 ]; then
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 "setuptools<58" && \
pip install "pip>=20.3" && \
pip install -r requirements.txt && \
./common/build && \
python $ODOO_WORK_DIR/common/entrypoint