You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2015/07/06 17:44:35 UTC

[2/2] trafficserver git commit: TS-3732: Add changelog make target to rel-candidate and improve error handling

TS-3732: Add changelog make target to rel-candidate and improve error handling

(cherry picked from commit 29b439c19b20f851df42de20007dd0ea76b572dd)


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

Branch: refs/heads/6.0.x
Commit: cca283cb9ae48e0851f037d3b99c6c8d4e336e32
Parents: d5898eb
Author: Phil Sorber <so...@apache.org>
Authored: Wed Jul 1 21:17:57 2015 -0600
Committer: Bryan Call <bc...@apache.org>
Committed: Mon Jul 6 08:44:13 2015 -0700

----------------------------------------------------------------------
 Makefile.am        |  4 ++--
 tools/changelog.pl | 13 +++++++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cca283cb/Makefile.am
----------------------------------------------------------------------
diff --git a/Makefile.am b/Makefile.am
index 2b9c1f7..5610f31 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,7 +55,7 @@ doxygen:
 
 changelog:
 	./tools/changelog.pl $(VERSION) > CHANGELOG-$(VERSION)
-	git add CHANGELOG-$(VERSION) && git commit -m "Adding CHANGELOG-$(VERSION)"
+	-git add CHANGELOG-$(VERSION) && git commit -m "Adding CHANGELOG-$(VERSION)"
 
 asf-dist: asf-distdir
 	tardir=$(distdir) && $(am__tar) --mtime=./configure.ac | bzip2 -9 -c >$(distdir).tar.bz2
@@ -84,7 +84,7 @@ asf-dist-sign-rc: asf-dist-rc
 release: changelog asf-dist-sign
 	git tag -fs -m "Release $(VERSION)" $(VERSION)
 
-rel-candidate: asf-dist-sign-rc
+rel-candidate: changelog asf-dist-sign-rc
 	git tag -fs -m "Release Candidate $(VERSION)-rc$(RC)" $(VERSION)-rc$(RC)
 
 examples: all

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cca283cb/tools/changelog.pl
----------------------------------------------------------------------
diff --git a/tools/changelog.pl b/tools/changelog.pl
index c3d0173..2b400a4 100755
--- a/tools/changelog.pl
+++ b/tools/changelog.pl
@@ -52,8 +52,7 @@ sub jira_search
   $curl->setopt(CURLOPT_WRITEDATA, \$resp_body);
   $curl->setopt(CURLOPT_URL, $url . $endpoint);
   my $retcode = $curl->perform();
-  if ($retcode == 0) {
-    my $response_code = $curl->getinfo(CURLINFO_HTTP_CODE);
+  if ($retcode == 0 && $curl->getinfo(CURLINFO_HTTP_CODE) == 200) {
     return from_json($resp_body);
   }
 
@@ -68,6 +67,11 @@ do
 {
   $issues = jira_search($url, $jql, $count);
 
+  if (!defined($issues))
+  {
+    exit 1;
+  }
+
   foreach my $issue (@{ $issues->{issues} })
   {
     if (defined($issue))
@@ -79,6 +83,11 @@ do
 }
 while ($count < $issues->{total});
 
+if (!defined($changelog))
+{
+  exit 1;
+}
+
 print "                                                         -*- coding: utf-8 -*-\n\n";
 print "Changes with Apache Traffic Server $fixversion\n";