parameters: ()
docstring: Generates version file based on the default format.
  
    Generated file is mozc_version.txt compatible.
docstring_summary: Generates version file based on the default format.
docstring_tokens: Generates version file based on the default format .
function: def main():
    """Generates version file based on the default format.
  
    Generated file is mozc_version.txt compatible.
    """
    parser = optparse.OptionParser(usage='Usage: %prog ')
    parser.add_option('--template_path', dest='template_path',
                      help='Path to a template version file.')
    parser.add_option('--output', dest='output',
                      help='Path to the output version file.')
    parser.add_option('--target_platform', dest='target_platform',
                      help='Target platform of the version info.')
    parser.add_option('--build_override', dest='build_override',
                      help='Overrides BUILD number in the template.')
    parser.add_option('--build_changelist_file', dest='build_changelist_file',
                      help='Filepath containing the BUILD number.')
    (options, args) = parser.parse_args()
    assert not args, 'Unexpected arguments.'
    assert options.template_path, 'No --template_path was specified.'
    assert options.output, 'No --output was specified.'
    assert options.target_platform, 'No --target_platform was specified.'
  
    cl_number = _GetChangelistNumber(options.build_override,
                                     options.build_changelist_file)
    GenerateVersionFile(
        version_template_path=options.template_path,
        version_path=options.output,
        target_platform=options.target_platform,
        version_override=cl_number)
function_tokens: def main ( ) : parser = optparse . OptionParser ( usage = 'Usage: %prog ' ) parser . add_option ( '--template_path' , dest = 'template_path' , help = 'Path to a template version file.' ) parser . add_option ( '--output' , dest = 'output' , help = 'Path to the output version file.' ) parser . add_option ( '--target_platform' , dest = 'target_platform' , help = 'Target platform of the version info.' ) parser . add_option ( '--build_override' , dest = 'build_override' , help = 'Overrides BUILD number in the template.' ) parser . add_option ( '--build_changelist_file' , dest = 'build_changelist_file' , help = 'Filepath containing the BUILD number.' ) ( options , args ) = parser . parse_args ( ) assert not args , 'Unexpected arguments.' assert options . template_path , 'No --template_path was specified.' assert options . output , 'No --output was specified.' assert options . target_platform , 'No --target_platform was specified.' cl_number = _GetChangelistNumber ( options . build_override , options . build_changelist_file ) GenerateVersionFile ( version_template_path = options . template_path , version_path = options . output , target_platform = options . target_platform , version_override = cl_number )