-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_eagle.sh
executable file
·43 lines (40 loc) · 1.58 KB
/
build_eagle.sh
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
COMPOSE="docker-compose"
# Check if the user has a different docker compose setup
if ! command -v $COMPOSE
then
COMPOSE="docker compose"
fi
case "$1" in
"dep")
export VCS_TAG=`git describe --tags --abbrev=0|sed s/v//`
echo "Building EAGLE version ${VCS_TAG}"
python updateVersion.py
$COMPOSE -f ./docker/docker-compose.dep.yml build
echo "Build finished!"
exit 1 ;;
"dev")
export VCS_TAG=`git rev-parse --abbrev-ref HEAD`
echo "Building EAGLE development version"
python updateVersion.py
$COMPOSE -f ./docker/docker-compose.dev.yml build
echo "Build finished!"
exit 1;;
"slim")
export VCS_TAG=`git describe --tags --abbrev=0|sed s/v//`
echo "Building EAGLE slim version ${VCS_TAG}"
python updateVersion.py
$COMPOSE -f ./docker/docker-compose.dep.yml build
echo "Build finished! Slimming the image now"
echo "This requires to interact with the intermediate server."
echo "Please open the EAGLE settings and put the gitHub and gitLab API keys in"
echo "and then try to access the repositories. Else this will not work in the"
echo "resulting slimmed image."
echo ""
echo ""
echo ">>>>> docker-slim output <<<<<<<<<"
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock dslim/docker-slim build --include-shell --include-path /usr/local/lib --include-path /usr/local/bin --http-probe=false icrar/eagle:${VCS_TAG}
;;
*)
echo "Usage: build_eagle.sh <dep|dev|slim>"
exit 1;;
esac