Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: build.py

Issue 29611593: Issue 5996 - Release consistent versions across WebExtensions (Closed) Base URL: https://codereview.adblockplus.org/29609559/
Left Patch Set: Created Nov. 17, 2017, 3:09 p.m.
Right Patch Set: Addressing comments Created Nov. 28, 2017, 2:17 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | localeTools.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # This Source Code Form is subject to the terms of the Mozilla Public 1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 4
5 import argparse 5 import argparse
6 import logging 6 import logging
7 import os 7 import os
8 import re 8 import re
9 import shutil 9 import shutil
10 import subprocess 10 import subprocess
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 locale_config = read_locale_config(base_dir, platform, metadata) 276 locale_config = read_locale_config(base_dir, platform, metadata)
277 277
278 import buildtools.localeTools as localeTools 278 import buildtools.localeTools as localeTools
279 localeTools.getTranslations(locale_config, basename, project_key) 279 localeTools.getTranslations(locale_config, basename, project_key)
280 280
281 281
282 @argparse_command( 282 @argparse_command(
283 valid_platforms={'chrome'}, 283 valid_platforms={'chrome'},
284 arguments=( 284 arguments=(
285 make_argument('target_dir'), 285 make_argument('target_dir'),
286 make_argument('-q', '--quiet', help='Suppress JsDoc output'), 286 make_argument('-q', '--quiet', help='Suppress JsDoc output',
287 action='store_true', default=False),
287 ) 288 )
288 ) 289 )
289 def docs(base_dir, target_dir, quiet, platform, **kwargs): 290 def docs(base_dir, target_dir, quiet, platform, **kwargs):
290 """ 291 """
291 Generate documentation (requires node.js). 292 Generate documentation (requires node.js).
292 293
293 Generate documentation files and write them into the specified directory. 294 Generate documentation files and write them into the specified directory.
294 """ 295 """
295 source_dir = os.path.join(base_dir, 'lib') 296 source_dir = os.path.join(base_dir, 'lib')
296 297
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 if build_available_subcommands(base_dir): 379 if build_available_subcommands(base_dir):
379 MAIN_PARSER.set_defaults(base_dir=base_dir) 380 MAIN_PARSER.set_defaults(base_dir=base_dir)
380 381
381 # If no args are provided, this module is run directly from the command 382 # If no args are provided, this module is run directly from the command
382 # line. argparse will take care of consuming sys.argv. 383 # line. argparse will take care of consuming sys.argv.
383 arguments = MAIN_PARSER.parse_args(args if len(args) > 0 else None) 384 arguments = MAIN_PARSER.parse_args(args if len(args) > 0 else None)
384 385
385 function = arguments.function 386 function = arguments.function
386 del arguments.function 387 del arguments.function
387 function(**vars(arguments)) 388 function(**vars(arguments))
LEFTRIGHT
« no previous file | localeTools.py » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld