Beispiel #1
0
         def resolvePath( self, name, mustExist = True ):

            path = getattr( self, name )
            if not path: return

            path = utility.joinPath( self.toplevelPath, os.path.expanduser( path ) )

            utility.printItem( name + ": ", path )

            if not os.path.exists( path ) and mustExist:
               utility.printError( "Required path does not exist:\n\t", path )
               raise SystemExit( 1 )

            setattr( self, name, path )
Beispiel #2
0
def buildProducts():

    utility.printHeading("Building products...")

    scripts = {
        "Darwin": "Scripts/Build/BuildDarwin.sh",
        "Linux": "Scripts/Build/BuildLinux.sh",
        "Windows": "Scripts\\Build\\BuildWindows.cmd",
    }

    scriptPath = utility.joinPath(config.toplevelPath,
                                  scripts[platform.system()])

    utility.runCommand('"' + scriptPath + '"')

    utility.printSuccess("Build completed successfully.")
                "Unable to extract version information from Git tags.")
            raise SystemExit(1)

        self.productVersion = matches.group(1)
        self.productStage = matches.group(2)
        self.productRevision = utility.captureCommandOutput(
            "git rev-parse --short=8 HEAD")
        self.productPackageName = "-".join([
            self.productName, self.productVersion, self.productStage,
            self.platformVersion
        ]).lower()

        utility.printItem("productVersion: ", self.productVersion)
        utility.printItem("productStage: ", self.productStage)
        utility.printItem("productRevision: ", self.productRevision)
        utility.printItem("productPackageName: ", self.productPackageName)

        os.chdir(self.toplevelPath)

    # Property list

    def propertyList(self):

        return dict(
            (name, getattr(self, name)) for name in dir(self)
            if not callable(getattr(self, name)) and not name.startswith('__'))


config = Configuration(
    utility.joinPath(utility.basePathAtSource(__file__), "..", "config.txt"))