jenkins-bot has submitted this change and it was merged.

Change subject: mwdocgen: support multiple --file values
......................................................................


mwdocgen: support multiple --file values

It is sometimes useful to generate documentation for multiple files or
directories. Doxygen INPUT statement supports multiple space separated
paths. Example usage:

 php maintenance/mwdocgen.php --file docs,input

Change-Id: I66a805d80307c6502e9b440df63a37bb13093d84
---
M maintenance/mwdocgen.php
1 file changed, 10 insertions(+), 2 deletions(-)

Approvals:
  Demon: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php
index 1ca0b54..9fb1314 100644
--- a/maintenance/mwdocgen.php
+++ b/maintenance/mwdocgen.php
@@ -57,7 +57,8 @@
                $this->addOption( 'generate-man',
                        'Whether to generate man files' );
                $this->addOption( 'file',
-                       'Only process given file (relative to $IP)',
+                       "Only process given file or directory. Multiple values 
" .
+                       "accepted with comma separation. Path relative to 
\$IP.",
                        false, true );
                $this->addOption( 'output',
                        'Path to write doc to',
@@ -75,7 +76,14 @@
 
                $this->doxygen = $this->getOption( 'doxygen', 'doxygen' );
                $this->mwVersion = $this->getOption( 'version', 'master' );
-               $this->input = $IP . '/' . $this->getOption( 'file', '' );
+
+               $this->input = '';
+               $inputs = explode( ',', $this->getOption( 'file', '' ) );
+               foreach( $inputs as $input ) {
+                       # Doxygen inputs are space separted and double quoted
+                       $this->input .= " \"$IP/$input\"";
+               }
+
                $this->output = $this->getOption( 'output', "$IP/docs" );
 
                $this->inputFilter = wfShellWikiCmd(

-- 
To view, visit https://gerrit.wikimedia.org/r/66140
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I66a805d80307c6502e9b440df63a37bb13093d84
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to