-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdev-setup.sh
More file actions
executable file
·49 lines (37 loc) · 1.6 KB
/
dev-setup.sh
File metadata and controls
executable file
·49 lines (37 loc) · 1.6 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
CURRENT_PATH=$(pwd)
CH_DIRECTORY="../.."
INSTALL_PYTEST=false
CURRENT_DIRECTORY="$(pwd)"
APP_NAME="samples"
pip_upgrade_error() {
echo "Unable to upgrade pip"
exit 1
}
install_error () {
echo "Unable to install $1" 1>&2
exit 1
}
while getopts ch_directory:pytest arg;
do
case "$arg" in
ch_directory) CH_DIRECTORY=${OPTARG};;
pytest) INSTALL_PYTEST=true;;
esac
done
pip install --upgrade pip || pip_upgrade_error
# Install pip dependencies from cloudharness-base-debian image
if $INSTALL_PYTEST; then
pip install pytest || install_error pytest
fi
pip install -r "$CH_DIRECTORY/libraries/models/requirements.txt" || install_error "models requirements"
pip install -r "$CH_DIRECTORY/libraries/cloudharness-common/requirements.txt" || install_error "cloudharness-common requirements"
pip install -r "$CH_DIRECTORY/libraries/client/cloudharness_cli/requirements.txt" || install_error "cloudharness_cli requirements"
pip install -e "$CH_DIRECTORY/libraries/models" || install_error models
pip install -e "$CH_DIRECTORY/libraries/cloudharness-common" || install_error cloudharness-common
pip install -e "$CH_DIRECTORY/libraries/client/cloudharness_cli" || install_error cloudharness_cli
# Install pip dependencies from cloudharness-django image
pip install -r "$CH_DIRECTORY/infrastructure/common-images/cloudharness-flask/requirements.txt" || install_error cloudharness-flask
# Install application
pip install -r "$CURRENT_DIRECTORY/backend/requirements.txt" || install_error "$APP_NAME dependencies"
pip install -e "$CURRENT_DIRECTORY/backend" || install_error "$APP_NAME"