forked from iovisor/bcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-deb.sh
executable file
·37 lines (26 loc) · 711 Bytes
/
build-deb.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
#!/bin/bash
# helper script to be invoked by jenkins/buildbot
# $1 [optional]: the build type - release | nightly | test
buildtype=${1:-test}
set -x
set -e
PARALLEL=${PARALLEL:-1}
TMP=$(mktemp -d /tmp/debuild.XXXXXX)
function cleanup() {
[[ -d $TMP ]] && rm -rf $TMP
}
trap cleanup EXIT
. scripts/git-tag.sh
git archive HEAD --prefix=bcc/ --format=tar.gz -o $TMP/bcc_$revision.orig.tar.gz
pushd $TMP
tar xf bcc_$revision.orig.tar.gz
cd bcc
if [[ "$buildtype" = "test" ]]; then
dch -b -v $revision-$release "$git_subject"
fi
if [[ "$buildtype" = "nightly" ]]; then
dch -v $revision-$release "$git_subject"
fi
DEB_BUILD_OPTIONS="nocheck parallel=${PARALLEL}" debuild -us -uc
popd
cp $TMP/*.deb .