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/30 18:15:23 UTC

[3/9] 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/1317b3f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/1317b3f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/1317b3f4

Branch: refs/heads/psql-rebase
Commit: 1317b3f42d8667d0d1e11433059a9daa9869b6b7
Parents: 06a565a
Author: Dan Kirkwood <da...@gmail.com>
Authored: Mon Nov 28 15:36:32 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Wed Nov 30 11:14:44 2016 -0700

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


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