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 #!/bin/bash
# helper script to be invoked by jenkins/buildbot
# $1 [optional]: the build type - release | nightly | test
buildtype=${1:-test}
set -x set -x
set -e set -e
...@@ -11,22 +16,21 @@ function cleanup() { ...@@ -11,22 +16,21 @@ function cleanup() {
} }
trap cleanup EXIT trap cleanup EXIT
git_tag_latest=$(git describe --abbrev=0) . scripts/git-tag.sh
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 git archive HEAD --prefix=bcc/ --format=tar.gz -o $TMP/bcc_$revision.orig.tar.gz
pushd $TMP pushd $TMP
tar xf bcc_$revision.orig.tar.gz tar xf bcc_$revision.orig.tar.gz
cd bcc 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 DEB_BUILD_OPTIONS="nocheck parallel=${PARALLEL}" debuild -us -uc
popd popd
......
...@@ -13,16 +13,8 @@ trap cleanup EXIT ...@@ -13,16 +13,8 @@ trap cleanup EXIT
mkdir $TMP/{BUILD,RPMS,SOURCES,SPECS,SRPMS} mkdir $TMP/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
llvmver=3.7.1 llvmver=3.7.1
# only the most recent tag
git_tag_latest=$(git describe --abbrev=0) . scripts/git-tag.sh
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}
git archive HEAD --prefix=bcc/ --format=tar.gz -o $TMP/SOURCES/$git_tag_latest.tar.gz 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 wget -P $TMP/SOURCES http://llvm.org/releases/$llvmver/{cfe,llvm}-$llvmver.src.tar.xz
......
...@@ -13,16 +13,8 @@ trap cleanup EXIT ...@@ -13,16 +13,8 @@ trap cleanup EXIT
mkdir $TMP/{BUILD,RPMS,SOURCES,SPECS,SRPMS} mkdir $TMP/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
llvmver=3.7.1 llvmver=3.7.1
# only the most recent tag
git_tag_latest=$(git describe --abbrev=0) . scripts/git-tag.sh
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}
git archive HEAD --prefix=bcc/ --format=tar.gz -o $TMP/SOURCES/bcc.tar.gz 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