[Pkg-mozext-commits] [adblock-plus] 390/464: Add --quiet option to "build.py docs" command to ignore JsDoc Toolkit output

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:36 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit 2758bd4369df850a68b70f4c0c7236e0a9cba832
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Thu Jul 4 12:41:20 2013 +0200

    Add --quiet option to "build.py docs" command to ignore JsDoc Toolkit output
---
 build.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/build.py b/build.py
index 9fbca4a..5eda204 100644
--- a/build.py
+++ b/build.py
@@ -358,9 +358,12 @@ def generateDocs(baseDir, scriptName, opts, args, type):
   targetDir = args[0]
 
   toolkit = None
+  quiet = False
   for option, value in opts:
     if option in ('-t', '--toolkit'):
       toolkit = value
+    elif option in ('-q', '--quiet'):
+      quiet = True
 
   if toolkit == None:
     toolkit = os.path.join(baseDir, 'jsdoc-toolkit')
@@ -373,11 +376,11 @@ def generateDocs(baseDir, scriptName, opts, args, type):
              '-a',
              '-p',
              '-x=js,jsm',
-             os.path.join(baseDir, 'modules'),
-             os.path.join(baseDir, 'components'),
              os.path.join(baseDir, 'lib')]
-  subprocess.check_call(command)
-
+  if quiet:
+    subprocess.check_call(command)
+  else:
+    subprocess.check_output(command)
 
 def runReleaseAutomation(baseDir, scriptName, opts, args, type):
   keyFile = None
@@ -471,6 +474,7 @@ with addCommand(generateDocs, 'docs') as command:
   command.shortDescription = 'Generate documentation (requires node.js)'
   command.description = 'Generate documentation files and write them into the specified directory. This operation requires node.js to be installed.'
   command.addOption('JsDoc Toolkit location', short='t', long='toolkit', value='dir')
+  command.addOption('Suppress JsDoc Toolkit output', short='q', long='quiet')
   command.params = '[options] <directory>'
   command.supportedTypes = ('gecko')
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list