aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2011-11-28 22:58:29 +0100
committerAndreas Fischer <bantu@phpbb.com>2011-11-29 20:05:21 +0100
commit4cf059e38f65330a553c2f5c8428c32ce17ab4d3 (patch)
tree843a0662c1e82b4e74a1b2fa566a2cff05b6bb2f /build
parent799be4469a99176bc14cf602c16995c260b10162 (diff)
downloadforums-4cf059e38f65330a553c2f5c8428c32ce17ab4d3.tar
forums-4cf059e38f65330a553c2f5c8428c32ce17ab4d3.tar.gz
forums-4cf059e38f65330a553c2f5c8428c32ce17ab4d3.tar.bz2
forums-4cf059e38f65330a553c2f5c8428c32ce17ab4d3.tar.xz
forums-4cf059e38f65330a553c2f5c8428c32ce17ab4d3.zip
[ticket/10480] Add a build script for exporting the changelog from tracker.
PHPBB3-10480
Diffstat (limited to 'build')
-rwxr-xr-xbuild/build_changelog.php53
1 files changed, 53 insertions, 0 deletions
diff --git a/build/build_changelog.php b/build/build_changelog.php
new file mode 100755
index 0000000000..4eb5ebd83b
--- /dev/null
+++ b/build/build_changelog.php
@@ -0,0 +1,53 @@
+#!/usr/bin/env php
+<?php
+/**
+*
+* @package build
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU General Public License
+*
+*/
+
+if ($_SERVER['argc'] != 2)
+{
+ echo "Please specify the new version as argument (e.g. build_changelog.php '1.0.2').\n";
+ exit(1);
+}
+
+$fixVersion = $_SERVER['argv'][1];
+
+$query = 'project = PHPBB3
+ AND resolution = Fixed
+ AND fixVersion = "' . $fixVersion . '"
+ AND status IN ("Unverified Fix", Closed)';
+
+$url = 'http://tracker.phpbb.com/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=' . urlencode($query) . '&tempMax=1000';
+$xml = simplexml_load_string(file_get_contents($url));
+
+foreach ($xml->xpath('//item') as $item)
+{
+ $key = (string) $item->key;
+
+ $keyUrl = 'http://tracker.phpbb.com/browse/' . $key;
+ $keyLink = '<a href="' . $keyUrl . '">' . $key . '</a>';
+
+ $value = str_replace($key, $keyLink, htmlspecialchars($item->title));
+ $value = str_replace(']', '] -', $value);
+
+ $types[(string) $item->type][$key] = $value;
+}
+
+ksort($types);
+foreach ($types as $type => $tickets)
+{
+ echo "<h4>$type</h4>\n";
+ echo "<ul>\n";
+
+ uksort($tickets, 'strnatcasecmp');
+
+ foreach ($tickets as $ticket)
+ {
+ echo "<li>$ticket</li>\n";
+ }
+ echo "</ul>\n";
+}