Commit 9134c565 authored by Brenden Blanco's avatar Brenden Blanco

Fixup build scripts to support in-flight version change

Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
parent 39a4c285
#!/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
......@@ -11,22 +16,21 @@ function cleanup() {
}
trap cleanup EXIT
git_tag_latest=$(git describe --abbrev=0)
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}
. 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
dch -v $revision-$release "$git_subject"
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
......
......@@ -13,16 +13,8 @@ trap cleanup EXIT
mkdir $TMP/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
llvmver=3.7.1
# only the most recent tag
git_tag_latest=$(git describe --abbrev=0)
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 [[ "$git_rev_count" != "1" ]]; then
release="${release}.git.$(git log --pretty='%h' -n 1)"
fi
revision=${git_tag_latest:1}
. scripts/git-tag.sh
git archive HEAD --prefix=bcc/ --format=tar.gz -o $TMP/SOURCES/$git_tag_latest.tar.gz
wget -P $TMP/SOURCES http://llvm.org/releases/$llvmver/{cfe,llvm}-$llvmver.src.tar.xz
......
......@@ -13,16 +13,8 @@ trap cleanup EXIT
mkdir $TMP/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
llvmver=3.7.1
# only the most recent tag
git_tag_latest=$(git describe --abbrev=0)
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 [[ "$git_rev_count" != "1" ]]; then
release="${release}.git.$(git log --pretty='%h' -n 1)"
fi
revision=${git_tag_latest:1}
. scripts/git-tag.sh
git archive HEAD --prefix=bcc/ --format=tar.gz -o $TMP/SOURCES/bcc.tar.gz
......
git_tag_latest=$(git describe --abbrev=0)
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}
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