Commit 8838fba7 authored by Brenden Blanco's avatar Brenden Blanco

Prepare deb build for nightly target

Add incremental release numbering for deb targets.
Tweak rpm release numbering as well.
Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
parent ce48d1ed
...@@ -3,7 +3,7 @@ Maintainer: Brenden Blanco <bblanco@plumgrid.com> ...@@ -3,7 +3,7 @@ Maintainer: Brenden Blanco <bblanco@plumgrid.com>
Section: misc Section: misc
Priority: optional Priority: optional
Standards-Version: 3.9.5 Standards-Version: 3.9.5
Build-Depends: debhelper (>= 9), cmake, libllvm3.8, llvm-3.8-dev, libclang-3.8-dev Build-Depends: debhelper (>= 9), cmake, libllvm3.7, llvm-3.7-dev, libclang-3.7-dev
Homepage: https://github.com/iovisor/bcc Homepage: https://github.com/iovisor/bcc
Package: libbcc Package: libbcc
......
...@@ -11,11 +11,22 @@ function cleanup() { ...@@ -11,11 +11,22 @@ function cleanup() {
} }
trap cleanup EXIT trap cleanup EXIT
mkdir $TMP/bcc git_tag_latest=$(git describe --abbrev=0)
cp -a * $TMP/bcc git_rev_count=$(git rev-list $git_tag_latest.. --count)
git_rev_count=$[$git_rev_count+1]
git_subject=$(git log --pretty="%s" -n 1)
release=$git_rev_count
if [[ "$release" != "1" ]]; then
release="${release}.git.$(git log --pretty='%h' -n 1)"
fi
revision=${git_tag_latest:1}
git archive HEAD --prefix=bcc/ --format=tar.gz -o $TMP/bcc_$revision.orig.tar.gz
pushd $TMP pushd $TMP
tar zcf bcc_0.1.7.orig.tar.gz bcc/ tar xf bcc_$revision.orig.tar.gz
cd bcc cd bcc
dch -v $revision-$release "$git_subject"
DEB_BUILD_OPTIONS="nocheck parallel=${PARALLEL}" debuild -us -uc DEB_BUILD_OPTIONS="nocheck parallel=${PARALLEL}" debuild -us -uc
popd popd
......
...@@ -16,9 +16,11 @@ llvmver=3.7.1 ...@@ -16,9 +16,11 @@ llvmver=3.7.1
# only the most recent tag # only the most recent tag
git_tag_latest=$(git describe --abbrev=0) git_tag_latest=$(git describe --abbrev=0)
git_rev_count=$(git rev-list $git_tag_latest.. --count) git_rev_count=$(git rev-list $git_tag_latest.. --count)
release=0 git_rev_count=$[$git_rev_count+1]
if [[ "$git_rev_count" != "0" ]]; then git_subject=$(git log --pretty="%s" -n 1)
release=$(git log --pretty='g%h' -n 1) release=$git_rev_count
if [[ "$git_rev_count" != "1" ]]; then
release="${release}.git.$(git log --pretty='%h' -n 1)"
fi fi
revision=${git_tag_latest:1} revision=${git_tag_latest:1}
......
...@@ -16,9 +16,11 @@ llvmver=3.7.1 ...@@ -16,9 +16,11 @@ llvmver=3.7.1
# only the most recent tag # only the most recent tag
git_tag_latest=$(git describe --abbrev=0) git_tag_latest=$(git describe --abbrev=0)
git_rev_count=$(git rev-list $git_tag_latest.. --count) git_rev_count=$(git rev-list $git_tag_latest.. --count)
release=0 git_rev_count=$[$git_rev_count+1]
if [[ "$git_rev_count" != "0" ]]; then git_subject=$(git log --pretty="%s" -n 1)
release=$(git log --pretty='g%h' -n 1) release=$git_rev_count
if [[ "$git_rev_count" != "1" ]]; then
release="${release}.git.$(git log --pretty='%h' -n 1)"
fi fi
revision=${git_tag_latest:1} revision=${git_tag_latest:1}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment