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/28 17:00:54 UTC

[1/5] incubator-trafficcontrol git commit: use $BUILD_NUMBER from env for traffic_router version

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/psql-rebase 3162178ac -> ec0d16262


use $BUILD_NUMBER from env for traffic_router version


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

Branch: refs/heads/psql-rebase
Commit: ec0d16262ef504b44b104d5a723d301d9acbb684
Parents: 0dc9f69
Author: Dan Kirkwood <da...@gmail.com>
Authored: Mon Nov 21 19:55:40 2016 +0000
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Mon Nov 28 10:00:16 2016 -0700

----------------------------------------------------------------------
 traffic_router/build/build_rpm.sh | 2 +-
 traffic_router/build/pom.xml      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ec0d1626/traffic_router/build/build_rpm.sh
----------------------------------------------------------------------
diff --git a/traffic_router/build/build_rpm.sh b/traffic_router/build/build_rpm.sh
index a7fc5ff..43d6943 100755
--- a/traffic_router/build/build_rpm.sh
+++ b/traffic_router/build/build_rpm.sh
@@ -56,7 +56,7 @@ function buildRpmTrafficRouter () {
 	installDnsSec
 
 	cd "$TR_DIR" || { echo "Could not cd to $TR_DIR: $?"; exit 1; }
-	export GIT_REV_COUNT=$(getRevCount)
+	export BUILD_NUMBER=${BUILD_NUMBER:-$(getBuildNumber)}
 	mvn -P rpm-build -Dmaven.test.skip=true -DminimumTPS=1 clean package ||  \
 		{ echo "RPM BUILD FAILED: $?"; exit 1; }
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ec0d1626/traffic_router/build/pom.xml
----------------------------------------------------------------------
diff --git a/traffic_router/build/pom.xml b/traffic_router/build/pom.xml
index fc30608..a4e611b 100644
--- a/traffic_router/build/pom.xml
+++ b/traffic_router/build/pom.xml
@@ -87,7 +87,7 @@
 						<configuration>
 							<rules>
 								<requireEnvironmentVariable>
-									<variableName>GIT_REV_COUNT</variableName>
+									<variableName>BUILD_NUMBER</variableName>
 								</requireEnvironmentVariable>
 							</rules>
 							<fail>true</fail>
@@ -125,7 +125,7 @@
 						<configuration>
 							<group>Applications/Internet</group>
 							<name>${project.parent.artifactId}</name>
-							<release>${env.GIT_REV_COUNT}.${buildNumber}.el6</release>
+							<release>${env.BUILD_NUMBER}.el6</release>
 							<needarch>x86_64</needarch>
 							<mappings>
 								<mapping>


[3/5] incubator-trafficcontrol git commit: if not in git tree, no tarball

Posted by da...@apache.org.
if not in git tree, no tarball


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

Branch: refs/heads/psql-rebase
Commit: 23e49aa13d088691416fa4d774e1c98a9eb7c7b9
Parents: 3162178
Author: Dan Kirkwood <da...@gmail.com>
Authored: Fri Nov 11 18:41:11 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Mon Nov 28 10:00:16 2016 -0700

----------------------------------------------------------------------
 build/build.sh     | 12 +++++++-----
 build/functions.sh |  7 ++++---
 2 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/23e49aa1/build/build.sh
----------------------------------------------------------------------
diff --git a/build/build.sh b/build/build.sh
index 1327280..32d47d4 100755
--- a/build/build.sh
+++ b/build/build.sh
@@ -28,11 +28,13 @@ export TC_DIR=$(dirname $(dirname "$topscript"))
 checkEnvironment
 
 # Create tarball first
-projName=$(basename $(pwd))
-echo "-----  Building tarball ..."
-tarball=$(createTarball "$TC_DIR")
-ls -l $tarball
-
+if isInGitTree; then
+	echo "-----  Building tarball ..."
+	tarball=$(createTarball "$TC_DIR")
+	ls -l $tarball
+else
+	echo "---- Skipping tarball creation"
+fi
 
 if [[ $# -gt 0 ]]; then
 	projects=( "$*" )

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/23e49aa1/build/functions.sh
----------------------------------------------------------------------
diff --git a/build/functions.sh b/build/functions.sh
index 2132064..4f56e7a 100755
--- a/build/functions.sh
+++ b/build/functions.sh
@@ -49,13 +49,14 @@ function getRevCount() {
 
 # ---------------------------------------
 function isInGitTree() {
-	git rev-parse --is-inside-work-tree 2>/dev/null
+	# ignore output -- use exit status
+	git rev-parse --is-inside-work-tree >/dev/null 2>&1
 }
 
 # ---------------------------------------
 function getBuildNumber() {
-	local in_git=$(isInGitTree)
-	if [[ $in_git ]]; then
+	local in_git=$()
+	if isInGitTree; then
 		local commits=$(getRevCount)
 		local sha=$(git rev-parse --short=8 HEAD)
 		echo "$commits.$sha"


[4/5] incubator-trafficcontrol git commit: revcount and commit from buildno

Posted by da...@apache.org.
revcount and commit from buildno


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

Branch: refs/heads/psql-rebase
Commit: 0dc9f69cde26e340e81405317b4bb7e1f4641e45
Parents: 860c102
Author: Dan Kirkwood <da...@gmail.com>
Authored: Sat Nov 12 19:00:25 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Mon Nov 28 10:00:16 2016 -0700

----------------------------------------------------------------------
 build/functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/0dc9f69c/build/functions.sh
----------------------------------------------------------------------
diff --git a/build/functions.sh b/build/functions.sh
index c237288..6fa861f 100755
--- a/build/functions.sh
+++ b/build/functions.sh
@@ -58,7 +58,7 @@ function isInGitTree() {
 function getBuildNumber() {
 	local in_git=$()
 	if isInGitTree; then
-		local commits=$(getRevCount)
+		local commits=$(git rev-list HEAD 2>/dev/null | wc -l)
 		local sha=$(git rev-parse --short=8 HEAD)
 		echo "$commits.$sha"
 	else


[5/5] incubator-trafficcontrol git commit: revcount and commit from buildno

Posted by da...@apache.org.
revcount and commit from buildno


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

Branch: refs/heads/psql-rebase
Commit: 08656fbc77ab08c46a2274c0db45da632988020f
Parents: 23e49aa
Author: Dan Kirkwood <da...@gmail.com>
Authored: Sat Nov 12 19:00:25 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Mon Nov 28 10:00:16 2016 -0700

----------------------------------------------------------------------
 build/functions.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/08656fbc/build/functions.sh
----------------------------------------------------------------------
diff --git a/build/functions.sh b/build/functions.sh
index 4f56e7a..6fa861f 100755
--- a/build/functions.sh
+++ b/build/functions.sh
@@ -44,7 +44,8 @@ function versionOk() {
 
 # ---------------------------------------
 function getRevCount() {
-	git rev-list HEAD 2>/dev/null | wc -l
+	local buildNum=$(getBuildNumber)
+	echo ${buildNum%.*}
 }
 
 # ---------------------------------------
@@ -57,7 +58,7 @@ function isInGitTree() {
 function getBuildNumber() {
 	local in_git=$()
 	if isInGitTree; then
-		local commits=$(getRevCount)
+		local commits=$(git rev-list HEAD 2>/dev/null | wc -l)
 		local sha=$(git rev-parse --short=8 HEAD)
 		echo "$commits.$sha"
 	else
@@ -85,7 +86,8 @@ function getRhelVersion {
 
 # ---------------------------------------
 function getCommit() {
-	git rev-parse HEAD
+	local buildNum=$(getBuildNumber)
+	echo ${buildNum%.*}
 }
 
 # ---------------------------------------


[2/5] incubator-trafficcontrol git commit: if not in git tree, no tarball

Posted by da...@apache.org.
if not in git tree, no tarball


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

Branch: refs/heads/psql-rebase
Commit: 860c1024501aa9280621d4611e93fec4920d8362
Parents: 08656fb
Author: Dan Kirkwood <da...@gmail.com>
Authored: Fri Nov 11 18:41:11 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Mon Nov 28 10:00:16 2016 -0700

----------------------------------------------------------------------
 build/functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/860c1024/build/functions.sh
----------------------------------------------------------------------
diff --git a/build/functions.sh b/build/functions.sh
index 6fa861f..c237288 100755
--- a/build/functions.sh
+++ b/build/functions.sh
@@ -58,7 +58,7 @@ function isInGitTree() {
 function getBuildNumber() {
 	local in_git=$()
 	if isInGitTree; then
-		local commits=$(git rev-list HEAD 2>/dev/null | wc -l)
+		local commits=$(getRevCount)
 		local sha=$(git rev-parse --short=8 HEAD)
 		echo "$commits.$sha"
 	else