Krinkle has submitted this change and it was merged.
Change subject: mwdocgen.php: Implement --version option.
......................................................................
mwdocgen.php: Implement --version option.
So that the job that runs it can pass along what it should
display (e.g. branch, tag, hash etc. whatever is appropiate
for the context of that run).
Change-Id: I1d5b6266e49a71672b0a53069e6ea6bb4658c3d2
---
M maintenance/mwdocgen.php
1 file changed, 11 insertions(+), 5 deletions(-)
Approvals:
Krinkle: Verified; Looks good to me, approved
diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php
index e36674e..37e626b 100644
--- a/maintenance/mwdocgen.php
+++ b/maintenance/mwdocgen.php
@@ -63,6 +63,8 @@
/** where Phpdoc should output documentation */
$doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ;
+$doxyVersion = 'master';
+
/** MediaWiki subpaths */
$mwPathI = $mwPath . 'includes/';
$mwPathL = $mwPath . 'languages/';
@@ -165,6 +167,12 @@
$doxyOutput = realpath( $argv[$i] );
}
break;
+ case '--version':
+ $i++;
+ if ( isset( $argv[$i] ) ) {
+ $doxyVersion = $argv[$i];
+ }
+ break;
case '--generate-man':
$doxyGenerateMan = true;
break;
@@ -184,8 +192,9 @@
If no command is given, you will be prompted.
Other options:
- --output <dir> Set output directory (default $doxyOutput)
+ --output <dir> Set output directory (default: $doxyOutput)
--generate-man Generates man page documentation
+ --version Project version to display in the outut (default:
$doxyVersion)
--help Show this help and exit.
@@ -235,14 +244,11 @@
$excludePatterns = 'extensions';
}
-// @todo FIXME to work on git
-$version = 'master';
-
// Generate path exclusions
$excludedPaths = $mwPath . join( " $mwPath", $mwExcludePaths );
print "EXCLUDE: $excludedPaths\n\n";
-$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath,
$version, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan );
+$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath,
$doxyVersion, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan );
$command = $doxygenBin . ' ' . $generatedConf;
echo <<<TEXT
--
To view, visit https://gerrit.wikimedia.org/r/60830
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1d5b6266e49a71672b0a53069e6ea6bb4658c3d2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_20
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits