You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2016/12/04 05:41:33 UTC
[07/22] incubator-trafficcontrol git commit: separate BUILD_NUMBER
and RHEL_NUMBER during build
separate BUILD_NUMBER and RHEL_NUMBER during build
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/45ec104a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/45ec104a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/45ec104a
Branch: refs/heads/psql-rebase
Commit: 45ec104a1bcdfdcda8a41f3613a7d2f7352a7adf
Parents: 8e86acf
Author: Dan Kirkwood <da...@gmail.com>
Authored: Mon Nov 28 15:36:32 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Mon Nov 28 15:36:32 2016 -0700
----------------------------------------------------------------------
build/functions.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/45ec104a/build/functions.sh
----------------------------------------------------------------------
diff --git a/build/functions.sh b/build/functions.sh
index 6fa861f..874c7e0 100755
--- a/build/functions.sh
+++ b/build/functions.sh
@@ -93,7 +93,8 @@ function getCommit() {
# ---------------------------------------
function checkEnvironment {
export TC_VERSION=$(getVersion "$TC_DIR")
- export BUILD_NUMBER="${BUILD_NUMBER:-$(getBuildNumber)}.$(getRhelVersion)"
+ export BUILD_NUMBER=$(getBuildNumber)
+ export RHEL_VERSION=$(getRhelVersion)
export WORKSPACE=${WORKSPACE:-$TC_DIR}
export RPMBUILD="$WORKSPACE/rpmbuild"
export DIST="$WORKSPACE/dist"
@@ -115,6 +116,7 @@ function checkEnvironment {
echo "=================================================="
echo "WORKSPACE: $WORKSPACE"
echo "BUILD_NUMBER: $BUILD_NUMBER"
+ echo "RHEL_VERSION: $RHEL_VERSION"
echo "TC_VERSION: $TC_VERSION"
echo "--------------------------------------------------"
}
@@ -130,15 +132,16 @@ function createSourceDir() {
# ---------------------------------------
function buildRpm () {
for package in "$@"; do
- local rpm="${package}-${TC_VERSION}-${BUILD_NUMBER}.$(uname -m).rpm"
- local srpm="${package}-${TC_VERSION}-${BUILD_NUMBER}.src.rpm"
+ local pre="${package}-${TC_VERSION}-${BUILD_NUMBER}.${RHEL_VERSION}"
+ local rpm="${pre}.$(uname -m).rpm"
+ local srpm="${pre}.src.rpm"
echo "Building the rpm."
cd "$RPMBUILD" && \
rpmbuild --define "_topdir $(pwd)" \
--define "traffic_control_version $TC_VERSION" \
--define "commit $(getCommit)" \
- --define "build_number $BUILD_NUMBER" \
+ --define "build_number $BUILD_NUMBER.$RHEL_VERSION" \
-ba SPECS/$package.spec || \
{ echo "RPM BUILD FAILED: $?"; exit 1; }