Repository: trafficserver Updated Branches: refs/heads/master 758b5ebfc -> a2eb53553
TS-3732 Rename changelog.pl, move changelog Makefile.am target Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a2eb5355 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a2eb5355 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a2eb5355 Branch: refs/heads/master Commit: a2eb53553645f75530ba0e51b3124ae116cb72eb Parents: 758b5eb Author: Leif Hedstrom <[email protected]> Authored: Wed Jul 1 18:58:54 2015 -0700 Committer: Leif Hedstrom <[email protected]> Committed: Wed Jul 1 18:58:54 2015 -0700 ---------------------------------------------------------------------- Makefile.am | 8 ++--- changelog.pl | 92 ------------------------------------------------- tools/changelog.pl | 92 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 96 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a2eb5355/Makefile.am ---------------------------------------------------------------------- diff --git a/Makefile.am b/Makefile.am index 569ff3a..ac1cf04 100644 --- a/Makefile.am +++ b/Makefile.am @@ -53,8 +53,8 @@ distclean-local: doxygen: @cd doc && $(MAKE) $(AM_MAKEFLAGS) $@ -gen-changelog: - ./changelog.pl $(VERSION) > CHANGELOG-$(VERSION) +changelog: + ./tools/changelog.pl $(VERSION) > CHANGELOG-$(VERSION) git add CHANGELOG-$(VERSION) && git commit -m "Adding CHANGELOG-$(VERSION)" asf-dist: asf-distdir @@ -65,7 +65,7 @@ asf-dist-rc: asf-distdir tardir=$(distdir) && $(am__tar) --mtime=./configure.ac | bzip2 -9 -c >$(distdir)-rc$(RC).tar.bz2 @$(am__remove_distdir) -asf-distdir: gen-changelog +asf-distdir: @$(am__remove_distdir) test -d .git && git clone . $(distdir) cd $(distdir) && git submodule update --init && autoreconf -i @@ -81,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/a2eb5355/changelog.pl ---------------------------------------------------------------------- diff --git a/changelog.pl b/changelog.pl deleted file mode 100755 index c3d0173..0000000 --- a/changelog.pl +++ /dev/null @@ -1,92 +0,0 @@ -#!/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"; - } -} http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a2eb5355/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"; + } +}
