Script work.

master
DominikDeak 5 years ago
parent ad0ec94daf
commit 45ae807115
No known key found for this signature in database
GPG Key ID: 85514EC0CCE7007C
  1. 12
      Scripts/Detail/Config.py
  2. 10
      Scripts/build.py

@ -21,6 +21,8 @@ class Configuration():
platformVersion = "" platformVersion = ""
productName = "" productName = ""
productVersion = "unknown-version"
productStage = "snapshot"
productPackageName = "" productPackageName = ""
productRepoPath = "" productRepoPath = ""
productBuildPath = "" productBuildPath = ""
@ -44,7 +46,8 @@ class Configuration():
section = platform.system() section = platform.system()
for name in self.variableList(): for name in self.variableList():
setattr( self, name, parser.get( section, name, fallback = "" ) ) value = parser.get( section, name, fallback = getattr( self, name ) )
setattr( self, name, value )
def validateToplevelPath( self ): def validateToplevelPath( self ):
@ -130,6 +133,12 @@ class Configuration():
def updateProductVersion( self ): def updateProductVersion( self ):
if not os.path.exists( self.productVersionPath ):
utility.printWarning( "Unable to determine product version at this time; version file was missing:\n\t", self.productVersionPath )
else:
versionFile = open( self.productVersionPath, "r" ) versionFile = open( self.productVersionPath, "r" )
versionData = versionFile.read() versionData = versionFile.read()
versionFile.close() versionFile.close()
@ -142,6 +151,7 @@ class Configuration():
self.productVersion = ".".join( versionParts[ 0:3 ] ) self.productVersion = ".".join( versionParts[ 0:3 ] )
self.productStage = versionParts[ 3 ] self.productStage = versionParts[ 3 ]
self.productPackageName = "-".join( [ self.productName, self.productVersion, self.productStage, self.platformVersion ] ).lower() self.productPackageName = "-".join( [ self.productName, self.productVersion, self.productStage, self.platformVersion ] ).lower()
utility.printItem( "productVersion: ", self.productVersion ) utility.printItem( "productVersion: ", self.productVersion )

@ -13,13 +13,15 @@ def configureSubmodules():
os.chdir( config.toplevelPath ) os.chdir( config.toplevelPath )
status = utility.captureCommandOutput( "git submodule status" ) statusBefore = utility.captureCommandOutput( "git submodule status" )
print( statusBefore )
print( status )
utility.runCommand( "git submodule update --init --remote --recursive" ) utility.runCommand( "git submodule update --init --remote --recursive" )
if status != utility.captureCommandOutput( "git submodule status" ): statusAfter = utility.captureCommandOutput( "git submodule status" )
if statusBefore != statusAfter:
print( statusAfter )
config.updateProductVersion() config.updateProductVersion()
def configureEnvironment(): def configureEnvironment():

Loading…
Cancel
Save