Repository: trafficserver
Updated Branches:
  refs/heads/master a2eb53553 -> 7b0a57f43


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


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

Branch: refs/heads/master
Commit: 29b439c19b20f851df42de20007dd0ea76b572dd
Parents: a2eb535
Author: Phil Sorber <[email protected]>
Authored: Wed Jul 1 21:17:57 2015 -0600
Committer: Phil Sorber <[email protected]>
Committed: Wed Jul 1 21:17:57 2015 -0600

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


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/29b439c1/Makefile.am
----------------------------------------------------------------------
diff --git a/Makefile.am b/Makefile.am
index ac1cf04..078cfc1 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/29b439c1/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";
 

Reply via email to