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/11/29 17:20:01 UTC

incubator-trafficcontrol git commit: separate BUILD_NUMBER and RHEL_NUMBER during build

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/1.8.x a2e712594 -> 8dc3f0cfe


separate BUILD_NUMBER and RHEL_NUMBER during build

(cherry picked from commit 45ec104a1bcdfdcda8a41f3613a7d2f7352a7adf)


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/8dc3f0cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/8dc3f0cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/8dc3f0cf

Branch: refs/heads/1.8.x
Commit: 8dc3f0cfe07bd8345a8c189a10db6c3d8d7d294b
Parents: a2e7125
Author: Dan Kirkwood <da...@gmail.com>
Authored: Mon Nov 28 15:36:32 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Tue Nov 29 16:48:28 2016 +0000

----------------------------------------------------------------------
 build/functions.sh | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8dc3f0cf/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; }