def __call__(self, sourceRoot, outputRoot=None, quiet=True):
     current_version, milestone = opera_coreversion.getCoreVersion(sourceRoot, "current")
     next_version, milestone = opera_coreversion.getCoreVersion(sourceRoot, "next")
     hardcoreDir = os.path.join(sourceRoot, 'modules', 'hardcore')
     documentationDir = os.path.join(hardcoreDir, 'documentation')
     version_js_template = os.path.join(documentationDir, 'version_template.js')
     changes = util.readTemplate(
         version_js_template, os.path.join(documentationDir, 'version.js'),
         GenerateVersionJs.TemplateAction(current_version, next_version),
         hardcoreDir, "documentation/version.js")
     if changes: return 2
     else: return 0
 def __call__(self, sourceRoot, outputRoot=None, quiet=True):
     current_version, milestone = opera_coreversion.getCoreVersion(
         sourceRoot, "current")
     next_version, milestone = opera_coreversion.getCoreVersion(
         sourceRoot, "next")
     hardcoreDir = os.path.join(sourceRoot, 'modules', 'hardcore')
     documentationDir = os.path.join(hardcoreDir, 'documentation')
     version_js_template = os.path.join(documentationDir,
                                        'version_template.js')
     changes = util.readTemplate(
         version_js_template, os.path.join(documentationDir, 'version.js'),
         GenerateVersionJs.TemplateAction(current_version, next_version),
         hardcoreDir, "documentation/version.js")
     if changes: return 2
     else: return 0
示例#3
0
def getFeatureDef(sourceRoot, mainline_configuration="current"):
    """
    This method creates a FeatureDefinition instance and loads the feature
    files for the specified mainline configuration.

    @note If there is an error on loading the feature definition, a UtilError
        exception is raised. The value of the exception includes the
        description of the error.

    @param sourceRoot is the path to the Opera source tree

    @param mainline_configuration is the name of the mainline-configuration
        to load.

    @return a loaded FeatureDefinition
    """
    # It is not allowed to use a versioned filename for the next
    # mainline configuration. Only the current mainline configuration
    # may have a version number. This allows a smooth transition on
    # releasing one mainline version and switching to the next
    # release.
    allow_versioned_filename = "current" == mainline_configuration
    feature_def = FeatureDefinition(allow_versioned_filename)
    core_version, milestone = opera_coreversion.getCoreVersion(sourceRoot, mainline_configuration)
    opera_version, force_version = opera_coreversion.getOperaVersion(sourceRoot, mainline_configuration)
    feature_def.load(
        featuresDir=os.path.join(sourceRoot, 'modules', 'hardcore', 'features'),
        core_version=core_version, milestone=milestone,
        opera_version=opera_version, force_version=force_version)
    return feature_def
示例#4
0
def getFeatureDef(sourceRoot, mainline_configuration="current"):
    """
    This method creates a FeatureDefinition instance and loads the feature
    files for the specified mainline configuration.

    @note If there is an error on loading the feature definition, a UtilError
        exception is raised. The value of the exception includes the
        description of the error.

    @param sourceRoot is the path to the Opera source tree

    @param mainline_configuration is the name of the mainline-configuration
        to load.

    @return a loaded FeatureDefinition
    """
    # It is not allowed to use a versioned filename for the next
    # mainline configuration. Only the current mainline configuration
    # may have a version number. This allows a smooth transition on
    # releasing one mainline version and switching to the next
    # release.
    allow_versioned_filename = "current" == mainline_configuration
    feature_def = FeatureDefinition(allow_versioned_filename)
    core_version, milestone = opera_coreversion.getCoreVersion(sourceRoot, mainline_configuration)
    opera_version, force_version = opera_coreversion.getOperaVersion(sourceRoot, mainline_configuration)
    feature_def.load(
        featuresDir=os.path.join(sourceRoot, 'modules', 'hardcore', 'features'),
        core_version=core_version, milestone=milestone,
        opera_version=opera_version, force_version=force_version)
    return feature_def