-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_debs.sh
executable file
·101 lines (93 loc) · 2.23 KB
/
build_debs.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/bin/bash
set -e
if [[ -z "${VERSION}" ]]; then
printf "Need to set the expected version of the packages!!\n"
exit 1
fi
if [[ -z "${BRANCH}" ]]; then
export BRANCH="master"
fi
if [[ -z "${IMAGE}" ]]; then
export IMAGE="debian:10-slim"
fi
if [[ -z "${TAG}" ]]; then
export TAG="latest"
fi
printf "Staring building of debian package ${PKG}-${VERSION} from branch ${BRANCH} using image ${IMAGE}\n"
case "$PKG" in
fog05)
cd fog05
./generate_deb.sh
;;
fog05-plugin-os-linux)
cd fog05-plugin-os-linux
./generate_deb.sh
;;
fog05-plugin-net-linuxbridge)
cd fog05-plugin-net-linuxbridge
./generate_deb.sh
;;
fog05-plugin-fdu-native)
cd fog05-plugin-fdu-native
./generate_deb.sh
;;
fog05-plugin-fdu-ros2)
cd fog05-plugin-fdu-ros2
./generate_deb.sh
;;
fog05-plugin-fdu-kvm)
cd fog05-plugin-fdu-kvm
./generate_deb.sh
;;
fog05-plugin-fdu-lxd)
cd fog05-plugin-fdu-lxd
./generate_deb.sh
;;
fog05-plugin-fdu-containerd)
cd fog05-plugin-fdu-containerd
./generate_deb.sh
;;
fog05-python3-sdk)
cd fog05-python3-sdk
./generate_deb.sh
;;
fog05-python3-api)
cd fog05-python3-api
./generate_deb.sh
;;
zenoh)
cd zenoh
./generate_deb.sh
;;
libzenoh)
cd libzenoh
./generate_deb.sh
;;
debian-ocaml)
sg docker -c "docker build ./deb10-ocaml -f ./deb10-ocaml/Dockerfile -t fog05/debian-build:$TAG --no-cache" --oom-kill-disable
;;
ubuntu-ocaml)
sg docker -c "docker build ./ubu18-ocaml -f ./ubu18-ocaml/Dockerfile -t fog05/ubuntu-build:$TAG --no-cache" --oom-kill-disable
;;
node-native)
sg docker -c "docker build ./node_native -f ./node_native/Dockerfile -t fog05/node:native --no-cache" --oom-kill-disable
;;
all)
for d in */; do
printf "Entering $d\n"
cd $d
if [-f "generate_deb.sh"]; then
./generate_deb.sh
fi
printf "Leaving $d\n"
cd ..
done
mkdir debs
mv *.deb debs/
;;
*)
printf "Unrecognized package name $PKG\n"
exit 1
;;
esac
exit 0