-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_release.sh
More file actions
executable file
·59 lines (50 loc) · 1.59 KB
/
build_release.sh
File metadata and controls
executable file
·59 lines (50 loc) · 1.59 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
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
VER=$1
BRANCH=$2
EXTRA_ARG=$3
if [ "$VER" == "" ]; then
echo "Error: version ID must be entered"
exit 1
fi
if [ "$BRANCH" == "" ]; then
BRANCH="mcell4_dev"
fi
PVER=`python3 --version 2>&1`
echo $PVER
if [[ $PVER != Python\ 3.9* ]]; then
# gamer and other components need to be built with python3.5 libraries
# and they use the default python3 executable to determine the location
# of the libraries
echo "Switching to conda python 3.9"
eval "$(conda shell.bash hook)"
conda activate py39 || exit 1
fi
# TODO: check that mcell_tools has the right branch
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
BUILD_INFRA_DIR=/home/ahusar/mcell/mcell_build_infrastructure_data/
if [ ! -d $BUILD_INFRA_DIR ]; then
BUILD_INFRA_DIR=/cnl/mcelldata/mcell_build_infrastructure_data/
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
# samba started to work very randomly with switch to Blender 2.93
BUILD_INFRA_DIR=~/mcell_build_infrastructure_data
elif [[ "$OSTYPE" == "msys" ]]; then
BUILD_INFRA_DIR=Z://
else
echo "Unsupported OS."
exit 1
fi
if [ ! -d $BUILD_INFRA_DIR ]; then
echo "Directory $BUILD_INFRA_DIR with build data was not found."
exit 1
fi
# note, there must not be system python other than 3.5 installed on MacOS otherwise cmake always selects that one
# maybe it can be fixed somehow but not sure how yet
if [ "$EXTRA_ARG" == "pkgtest" ]; then
STEPS="-34"
EXTRA_ARG=""
else
STEPS="-1234"
fi
echo "./run.py $EXTRA_ARG $STEPS -u -z -b $BRANCH -i -r $VER --store-build -m $BUILD_INFRA_DIR"
./run.py $EXTRA_ARG $STEPS -u -z -b $BRANCH -i -r $VER --store-build -m $BUILD_INFRA_DIR