diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/build.xml | 80 | ||||
-rwxr-xr-x | build/build_changelog.php | 53 | ||||
-rwxr-xr-x | build/build_diff.php | 5 | ||||
-rw-r--r-- | build/build_helper.php | 5 | ||||
-rw-r--r-- | build/diff_class.php | 3 | ||||
-rwxr-xr-x | build/package.php | 3 | ||||
-rw-r--r-- | build/phpdoc-phpbb.ini | 145 |
7 files changed, 260 insertions, 34 deletions
diff --git a/build/build.xml b/build/build.xml index bf77d82f6c..c1179015eb 100644 --- a/build/build.xml +++ b/build/build.xml @@ -2,9 +2,9 @@ <project name="phpBB" description="The phpBB forum software" default="all" basedir="../"> <!-- a few settings for the build --> - <property name="newversion" value="3.0.8" /> - <property name="prevversion" value="3.0.8-RC1" /> - <property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7-PL1" /> + <property name="newversion" value="3.0.11-RC1" /> + <property name="prevversion" value="3.0.10" /> + <property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.9" /> <!-- no configuration should be needed beyond this point --> <property name="oldversions" value="${olderversions}, ${prevversion}" /> @@ -12,7 +12,8 @@ <!-- These are the main targets which you will probably want to use --> <target name="package" depends="clean,prepare,create-package" /> - <target name="all" depends="clean,prepare,test,create-package" /> + <target name="all" depends="clean,prepare,test,docs,create-package" /> + <target name="build" depends="clean,prepare,test,docs" /> <target name="prepare"> <mkdir dir="build/logs" /> @@ -42,26 +43,34 @@ <delete dir="build/save" /> </target> - <target name="test"> - <exec dir="tests" - command="phpunit --log-junit ../build/logs/phpunit.xml - --coverage-clover ../build/logs/clover.xml - --coverage-html ../build/coverage - phpbb_all_tests all_tests.php" + <target name="test" depends="clean,prepare"> + <exec dir="." + command="phpunit --log-junit build/logs/phpunit.xml + --coverage-clover build/logs/clover.xml + --coverage-html build/coverage" passthru="true" /> + </target> + <target name="test-slow" depends="clean,prepare"> + <exec dir="." + command="phpunit --log-junit build/logs/phpunit.xml + --configuration phpunit.xml.all + --group slow + --coverage-clover build/logs/clover-slow.xml + --coverage-html build/coverage-slow" + passthru="true" /> + </target> - <!-- Does not allow changing the working directory to tests/ - so this approach does not work for us unfortunately - <phpunit codecoverage="true" haltonfailure="true"> - <formatter todir="build/logs" type="xml"/> - <batchtest> - <fileset dir="tests"> - <include name="all_tests.php"/> - </fileset> - </batchtest> - </phpunit> - --> + <target name="docs"> + <!-- only works if you setup phpdoctor: + git clone https://github.com/peej/phpdoctor.git + and then create an executable phpdoctor in your path containing + #!/bin/sh + php -f /path/to/phpdoctor/phpdoc.php $@ + --> + <exec dir="build" + command="phpdoctor phpdoc-phpbb.ini" + passthru="true" /> </target> <target name="old-version-diffs"> @@ -110,6 +119,29 @@ <target name="create-package" depends="prepare-new-version,old-version-diffs"> <exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" /> <exec dir="build" command="php -f build_diff.php '${prevversion}' '${newversion}' > logs/build_diff.log" escape="false" /> + + <exec dir="build" escape="false" + command="diff -crNEBwd old_versions/release-${prevversion}/language new_version/phpBB3/language > + save/save_${prevversion}_to_${newversion}/language/phpbb-${prevversion}_to_${newversion}_language.patch" /> + <exec dir="build" escape="false" + command="diff -crNEBwd old_versions/release-${prevversion}/styles/prosilver new_version/phpBB3/styles/prosilver > + save/save_${prevversion}_to_${newversion}/prosilver/phpbb-${prevversion}_to_${newversion}_prosilver.patch" /> + <exec dir="build" escape="false" + command="diff -crNEBwd old_versions/release-${prevversion}/styles/subsilver2 new_version/phpBB3/styles/subsilver2 > + save/save_${prevversion}_to_${newversion}/subsilver2/phpbb-${prevversion}_to_${newversion}_subsilver2.patch" /> + + <exec dir="build" escape="false" + command="git shortlog --summary --numbered release-${prevversion}...HEAD > + save/save_${prevversion}_to_${newversion}/phpbb-${prevversion}_to_${newversion}_git_shortlog.txt" /> + <exec dir="build" escape="false" + command="git diff --stat release-${prevversion}...HEAD > + 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> <!-- @@ -121,7 +153,7 @@ --> <target name="export"> <exec dir="phpBB" - command="git archive ${revision} | tar -x -C ../${dir}" + command="git archive ${revision} | tar -xf - -C ../${dir}" checkreturn="true" /> <delete file="${dir}/config.php" /> <delete dir="${dir}/develop" /> @@ -129,8 +161,8 @@ <echo msg="Setting permissions for checkout of ${revision} in ${dir}" /> <!-- set permissions of all files to 644, directories to 755 --> - <exec dir="${dir}" command="find -type f|xargs chmod 644" escape="false" /> - <exec dir="${dir}" command="find -type d|xargs chmod 755" escape="false" /> + <exec dir="${dir}" command="find . -type f|xargs chmod 644" escape="false" /> + <exec dir="${dir}" command="find . -type d|xargs chmod 755" escape="false" /> <!-- set permissions of some directories to 777 --> <chmod mode="0777" file="${dir}/cache" /> <chmod mode="0777" file="${dir}/store" /> diff --git a/build/build_changelog.php b/build/build_changelog.php new file mode 100755 index 0000000000..1e80959adf --- /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-2.0.php GNU General Public License v2 +* +*/ + +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"; +} diff --git a/build/build_diff.php b/build/build_diff.php index 6a6070228f..0824b53caa 100755 --- a/build/build_diff.php +++ b/build/build_diff.php @@ -3,9 +3,8 @@ /** * * @package build -* @version $Id$ * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ @@ -388,7 +387,7 @@ function build_header($mode, $filenames, $header) $html .= "## {$filename['phpbb_filename']}\n"; } } - $html .= "## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 \n"; + $html .= "## License: http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 \n"; $html .= "############################################################## \n"; $html .= "\n"; diff --git a/build/build_helper.php b/build/build_helper.php index 94fc0ff3b5..d6169b913b 100644 --- a/build/build_helper.php +++ b/build/build_helper.php @@ -2,9 +2,8 @@ /** * * @package build -* @version $Id$ * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ @@ -177,7 +176,7 @@ class build_package } // Is binary? - if (preg_match('/^Binary files ' . $package_name . '\/(.*) and [a-z0-9_-]+\/\1 differ/i', $line, $match)) + if (preg_match('/^Binary files ' . $package_name . '\/(.*) and [a-z0-9._-]+\/\1 differ/i', $line, $match)) { $binary[] = trim($match[1]); } diff --git a/build/diff_class.php b/build/diff_class.php index 4625ffde24..2d8555400d 100644 --- a/build/diff_class.php +++ b/build/diff_class.php @@ -2,10 +2,9 @@ /** * * @package build -* @version $Id$ * @copyright (c) 2000 Geoffrey T. Dairiki <dairiki@dairiki.org> * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/build/package.php b/build/package.php index 4ce644e8ca..48f42b3572 100755 --- a/build/package.php +++ b/build/package.php @@ -3,9 +3,8 @@ /** * * @package build -* @version $Id$ * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/build/phpdoc-phpbb.ini b/build/phpdoc-phpbb.ini new file mode 100644 index 0000000000..f1a7a4bee5 --- /dev/null +++ b/build/phpdoc-phpbb.ini @@ -0,0 +1,145 @@ +; Default configuration file for PHPDoctor + +; This config file will cause PHPDoctor to generate API documentation of +; itself. + + +; PHPDoctor settings +; ----------------------------------------------------------------------------- + +; Names of files to parse. This can be a single filename, or a comma separated +; list of filenames. Wildcards are allowed. + +files = "*.php" + +; Names of files or directories to ignore. This can be a single filename, or a +; comma separated list of filenames. Wildcards are NOT allowed. + +;ignore = "CVS, .svn, .git, _compiled" +ignore = templates_c/,*HTML/default/*,spec/,*config.php*,*CVS/,test_chora.php,testupdate/,cache/,store/,*proSilver/,develop/,includes/utf/data/,includes/captcha/fonts/,install/update/,install/update.new/,files/,*phpinfo.php*,*update_script.php*,*upgrade.php*,*convert.php*,install/converter/,language/de/,script/,*swatch.php*,*test.php*,*test2.php*,*install.php*,*functions_diff.php*,*acp_update.php*,acm_xcache.php + +; The directory to look for files in, if not used the PHPDoctor will look in +; the current directory (the directory it is run from). + +source_path = "../phpBB/" + +; If you do not want PHPDoctor to look in each sub directory for files +; uncomment this line. + +;subdirs = off + +; Set how loud PHPDoctor is as it runs. Quiet mode suppresses all output other +; than warnings and errors. Verbose mode outputs additional messages during +; execution. + +quiet = on +;verbose = on + +; Select the doclet to use for generating output. + +doclet = standard +;doclet = debug + +; The directory to find the doclet in. Doclets control the HTML output of +; phpDoctor and can be modified to suit your needs. They are expected to be +; in a directory named after themselves at the location given. + +;doclet_path = ./doclets + +; Select the formatter to use for generating output. + +;formatter = htmlStandardFormatter + +; The directory to find the formatter in. Formatters convert textual markup +; for use by the doclet. + +;formatter_path = ./formatters + +; The directory to find taglets in. Taglets allow you to make PHPDoctor handle +; new tags and to alter the behavour of existing tags and their output. + +;taglet_path = ./taglets + +; If the code you are parsing does not use package tags or not all elements +; have package tags, use this setting to place unbound elements into a +; particular package. + +default_package = "phpBB" + +use_class_path_as_package = off + +ignore_package_tags = off + +; Specifies the name of a HTML file containing text for the overview +; documentation to be placed on the overview page. The path is relative to +; "source_path" unless an absolute path is given. + +overview = ../README.md + +; Package comments will be looked for in a file named package.html in the same +; directory as the first source file parsed in that package or in the directory +; given below. If package comments are placed in the directory given below then +; they should be named "<packageName>.html". + +package_comment_dir = ./ + +; Parse out global variables and/or global constants? + +;globals = off +;constants = off + +; Generate documentation for all class members + +;private = on + +; Generate documentation for public and protected class members + +;protected = on + +; Generate documentation for only public class members + +;public = on + +; Use the PEAR compatible handling of the docblock first sentence + +;pear_compat = on + +; Standard doclet settings +; ----------------------------------------------------------------------------- + +; The directory to place generated documentation in. If the given path is +; relative to it will be relative to "source_path". + +d = "../build/api/" + +; Specifies the title to be placed in the HTML <title> tag. + +windowtitle = "phpBB3" + +; Specifies the title to be placed near the top of the overview summary file. + +doctitle = "phpBB3 Sourcecode Documentation" + +; Specifies the header text to be placed at the top of each output file. The +; header will be placed to the right of the upper navigation bar. + +header = "phpBB3" + +; Specifies the footer text to be placed at the bottom of each output file. The +; footer will be placed to the right of the lower navigation bar. + +footer = "phpBB3" + +; Specifies the text to be placed at the bottom of each output file. The text +; will be placed at the bottom of the page, below the lower navigation bar. + +;bottom = "This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a>" + +; Create a class tree? + +;tree = off + +; Use GeSHi to include formatted source files in the documentation. PHPDoctor will look in the current doclet directory for a /geshi subdirectory. Unpack the GeSHi archive from http://qbnz.com/highlighter to get this directory - it will contain a php script and a subdirectory with formatting files. + +include_source = off + |