示例#1
0
def kake(globalConfig, remainingArguments):
    makePhase = globalConfig.getItem('make.phase')
    if not isStandardPhase(makePhase):
        reportWrongPhase()

    moduleManager = ModuleManager()

    if isPhaseWithConfig(makePhase):
        projectFilename = globalConfig.getItem('project.filename')
        if existProjectFile(projectFilename) == False:
            reportNoProjectFile()

        projectFile = open(projectFilename)
        projectFileContent = projectFile.read()
        projectFile.close()
        projectConfig = yaml.load(projectFileContent)
        projectConfig['global'] = globalConfig.toDictionary()
        projectConfig['global']['args'] = remainingArguments

        module = moduleManager.getModule(projectConfig['project']['type'])
        moduleAction = moduleManager.getModuleAction(module, makePhase)
        moduleAction(Configuration.fromDictionary(projectConfig))
    elif isPhaseWithoutConfig(makePhase):
        module = moduleManager.getModule(remainingArguments[0])
        moduleAction = moduleManager.getModuleAction(module, makePhase)
        moduleAction()
示例#2
0
    def build(self, projectConfig):
        for project in self.projects:
            projectFilename = globalConfig.getItem('project.filename')
            if existProjectFile(projectFilename) == False:
                reportNoProjectFile()

            projectFile = open(projectFilename)
            projectFileContent = projectFile.read()
            projectFile.close()
            projectConfig = yaml.load(projectFileContent)
            projectConfig['global'] = globalConfig.toDictionary()
            projectConfig['global']['args'] = remainingArguments

            module = moduleManager.getModule(projectConfig['project']['type'])
            moduleAction = moduleManager.getModuleAction(module, makePhase)
            moduleAction(Configuration.fromDictionary(projectConfig))

        returnValue = 0
        if returnValue == 0:
            return True
        else:
            return False
    def build(self, projectConfig):
        for project in self.projects:
            projectFilename = globalConfig.getItem('project.filename')
            if existProjectFile(projectFilename) == False:
                reportNoProjectFile()

            projectFile = open(projectFilename)
            projectFileContent = projectFile.read()
            projectFile.close()
            projectConfig = yaml.load(projectFileContent)
            projectConfig['global'] = globalConfig.toDictionary()
            projectConfig['global']['args'] = remainingArguments

            module = moduleManager.getModule(projectConfig['project']['type'])
            moduleAction = moduleManager.getModuleAction(module, makePhase)
            moduleAction(Configuration.fromDictionary(projectConfig))
            

        returnValue = 0
        if returnValue == 0:
            return True
        else:
            return False