HMBXR5601-395 pick up buildstamp correctly and use for git commit tag
This commit is contained in:
parent
6c9aceb341
commit
d9ec2f62c3
1 changed files with 8 additions and 30 deletions
|
|
@ -75,21 +75,14 @@ def allGitRevisionsMatch():
|
|||
break
|
||||
return match
|
||||
|
||||
# The definitive version info is stored within the USB driver installer import
|
||||
versionPrefixFile = "prefix.txt"
|
||||
revisionFile = "revision.txt"
|
||||
def getVersionNumber():
|
||||
usbDriverSourceItem = sourceItems[0]
|
||||
versionDir = os.path.join(workspace, usbDriverSourceItem[1])
|
||||
versionPrefixFilePath = os.path.join(versionDir, versionPrefixFile)
|
||||
vpf = open(versionPrefixFilePath)
|
||||
versionPrefix = vpf.readline().strip().lower()
|
||||
vpf.close()
|
||||
revisionFilePath = os.path.join(versionDir, revisionFile)
|
||||
rp = open(revisionFilePath)
|
||||
revision = rp.readline().strip().lower()
|
||||
# The definitive version info is stored within the version import
|
||||
|
||||
def getVersionNumber():
|
||||
versionFilePath = os.path.join(workspace, sourceItems[0][1], "buildstamp.txt")
|
||||
rp = open(versionFilePath)
|
||||
versionNumber = rp.readline().strip().lower()
|
||||
rp.close()
|
||||
versionNumber = versionPrefix + revision
|
||||
print("versionNumber: ",versionNumber)
|
||||
return versionNumber
|
||||
|
||||
class RepoError(Exception):
|
||||
|
|
@ -253,28 +246,13 @@ def main():
|
|||
if not isCommitRequired():
|
||||
print("Commit has not been demanded - exiting")
|
||||
sys.exit(0)
|
||||
|
||||
#try:
|
||||
# allRevisionsMatch = allGitRevisionsMatch()
|
||||
#except RevisionError as r:
|
||||
# print("The ", r.component(), " does not have a valid git revision")
|
||||
# sys.exit(1)
|
||||
#
|
||||
#if not allRevisionsMatch:
|
||||
# print("The git revisions of all the components do not match")
|
||||
# sys.exit(1)
|
||||
|
||||
|
||||
|
||||
versionNumber = getVersionNumber()
|
||||
print("Version number of release is: ", versionNumber)
|
||||
|
||||
if not createReleaseFolders():
|
||||
print("The release folders could not be created")
|
||||
sys.exit(1)
|
||||
|
||||
#if not makeDestinationPaths():
|
||||
# print("Failed to make destination directories")
|
||||
# sys.exit(1)
|
||||
|
||||
if not copySourceToDestination():
|
||||
print("Failed to copy source to destination")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue