diff options
author | Nils Adermann <naderman@naderman.de> | 2011-12-01 22:21:57 +0100 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2011-12-01 22:21:57 +0100 |
commit | 5e225d5d7ab3890a6a06791742d1b2d97d9f40e1 (patch) | |
tree | 229bddb1b0662e4db8555045521d604d26100f6f /build | |
parent | af867de77c1e478a5294daabf6f482e19fa1a799 (diff) | |
parent | cafe74a88de1adfc09ea23207ff1736a08b95cce (diff) | |
download | forums-5e225d5d7ab3890a6a06791742d1b2d97d9f40e1.tar forums-5e225d5d7ab3890a6a06791742d1b2d97d9f40e1.tar.gz forums-5e225d5d7ab3890a6a06791742d1b2d97d9f40e1.tar.bz2 forums-5e225d5d7ab3890a6a06791742d1b2d97d9f40e1.tar.xz forums-5e225d5d7ab3890a6a06791742d1b2d97d9f40e1.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10480] Add a build target for changelog building.
[ticket/10480] Add a build script for exporting the changelog from tracker.
[ticket/10502] Fix typo in changelog. 'red' should have been 'read'.
Diffstat (limited to 'build')
-rw-r--r-- | build/build.xml | 6 | ||||
-rwxr-xr-x | build/build_changelog.php | 53 |
2 files changed, 59 insertions, 0 deletions
diff --git a/build/build.xml b/build/build.xml index 18b03243c2..2c42e1e162 100644 --- a/build/build.xml +++ b/build/build.xml @@ -138,6 +138,12 @@ save/save_${prevversion}_to_${newversion}/phpbb-${prevversion}_to_${newversion}_git_diffstat.txt" /> </target> + <target name="changelog" depends="prepare"> + <exec dir="build" escape="false" + command="php -f build_changelog.php '${newversion}' > + save/changelog_${newversion}.html" /> + </target> + <!-- This target can be called using phingcall to retrieve a clean checkout of a commit from git. It will only export the phpBB directory. 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"; +} |