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:34 UTC
[1/2] trafficserver git commit: TS-3732 Rename changelog.pl,
move changelog Makefile.am target
Repository: trafficserver
Updated Branches:
refs/heads/6.0.x 703ccb710 -> cca283cb9
TS-3732 Rename changelog.pl, move changelog Makefile.am target
(cherry picked from commit a2eb53553645f75530ba0e51b3124ae116cb72eb)
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/d5898eb1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/d5898eb1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/d5898eb1
Branch: refs/heads/6.0.x
Commit: d5898eb1e81b67bbae087370db7cc8f8c599756c
Parents: 703ccb7
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed Jul 1 18:58:54 2015 -0700
Committer: Bryan Call <bc...@apache.org>
Committed: Mon Jul 6 08:43:54 2015 -0700
----------------------------------------------------------------------
Makefile.am | 6 +++-
tools/changelog.pl | 92 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 97 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d5898eb1/Makefile.am
----------------------------------------------------------------------
diff --git a/Makefile.am b/Makefile.am
index f388e60..2b9c1f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,6 +53,10 @@ distclean-local:
doxygen:
@cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
+changelog:
+ ./tools/changelog.pl $(VERSION) > 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
@$(am__remove_distdir)
@@ -77,7 +81,7 @@ asf-dist-sign-rc: asf-dist-rc
sha1sum -b $(distdir)-rc$(RC).tar.bz2 >$(distdir)-rc$(RC).tar.bz2.sha1
gpg --armor --output $(distdir)-rc$(RC).tar.bz2.asc --detach-sig $(distdir)-rc$(RC).tar.bz2
-release: asf-dist-sign
+release: changelog asf-dist-sign
git tag -fs -m "Release $(VERSION)" $(VERSION)
rel-candidate: asf-dist-sign-rc
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d5898eb1/tools/changelog.pl
----------------------------------------------------------------------
diff --git a/tools/changelog.pl b/tools/changelog.pl
new file mode 100755
index 0000000..c3d0173
--- /dev/null
+++ b/tools/changelog.pl
@@ -0,0 +1,92 @@
+#!/usr/bin/perl
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+use strict;
+use warnings;
+
+use WWW::Curl::Easy;
+use JSON;
+
+my $fixversion = shift;
+my $url = "https://issues.apache.org/jira";
+my $jql = "project = TS AND status in (Resolved, Closed) AND fixVersion = $fixversion ORDER BY key ASC";
+
+sub jira_search
+{
+ my $url = shift;
+ my $jql = shift;
+ my $index = shift;
+ my $endpoint = "/rest/api/2/search";
+
+ my $query = {
+ jql => $jql,
+ startAt => $index,
+ fields => [
+ "summary",
+ "issuetype"
+ ]
+ };
+
+ my $req_body = to_json($query);
+ my $resp_body;
+ my $curl = WWW::Curl::Easy->new;
+
+ $curl->setopt(CURLOPT_POST, 1);
+ $curl->setopt(CURLOPT_POSTFIELDS, $req_body);
+ $curl->setopt(CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
+ $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);
+ return from_json($resp_body);
+ }
+
+ undef;
+}
+
+my $count = 0;
+my $changelog;
+my $issues;
+
+do
+{
+ $issues = jira_search($url, $jql, $count);
+
+ foreach my $issue (@{ $issues->{issues} })
+ {
+ if (defined($issue))
+ {
+ push @{ $changelog->{$issue->{fields}{issuetype}{name}} }, {key => $issue->{key}, summary => $issue->{fields}{summary}};
+ $count++;
+ }
+ }
+}
+while ($count < $issues->{total});
+
+print " -*- coding: utf-8 -*-\n\n";
+print "Changes with Apache Traffic Server $fixversion\n";
+
+foreach my $key (sort keys %{ $changelog })
+{
+ print "\n$key:\n\n";
+ foreach my $issue (@{ $changelog->{$key} })
+ {
+ print " *) [$issue->{key}] $issue->{summary}\n\n";
+ }
+}
[2/2] trafficserver git commit: TS-3732: Add changelog make target to
rel-candidate and improve error handling
Posted by bc...@apache.org.
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";