summaryrefslogtreecommitdiff
path: root/utils/common/deploy.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/common/deploy.py')
-rwxr-xr-xutils/common/deploy.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/utils/common/deploy.py b/utils/common/deploy.py
index db97c9b291..74dfab420c 100755
--- a/utils/common/deploy.py
+++ b/utils/common/deploy.py
@@ -132,8 +132,8 @@ def getsources(svnsrv, filelist, dest):
132 return 0 132 return 0
133 133
134 134
135def gettrunkrev(svnsrv): 135def getfolderrev(svnsrv):
136 '''Get the revision of trunk for svnsrv''' 136 '''Get the most recent revision for svnsrv'''
137 client = pysvn.Client() 137 client = pysvn.Client()
138 entries = client.info2(svnsrv, recurse=False) 138 entries = client.info2(svnsrv, recurse=False)
139 return entries[0][1].rev.number 139 return entries[0][1].rev.number
@@ -543,20 +543,20 @@ def deploy():
543 # make sure the path doesn't contain backslashes to prevent issues 543 # make sure the path doesn't contain backslashes to prevent issues
544 # later when running on windows. 544 # later when running on windows.
545 workfolder = re.sub(r'\\', '/', w) 545 workfolder = re.sub(r'\\', '/', w)
546 revision = getfolderrev(svnbase)
546 if buildid == None: 547 if buildid == None:
547 versionextra = "" 548 versionextra = ""
548 else: 549 else:
549 versionextra = "-" + buildid 550 versionextra = "-" + buildid
550 if not tag == "": 551 if tag != "":
551 sourcefolder = workfolder + "/" + tag + "/" 552 sourcefolder = workfolder + "/" + tag + "/"
552 archivename = tag + versionextra + "-src.tar.bz2" 553 archivename = tag + versionextra + "-src.tar.bz2"
553 # get numeric version part from tag 554 # get numeric version part from tag
554 ver = "v" + re.sub('^[^\d]+', '', tag) 555 ver = "v" + re.sub('^[^\d]+', '', tag)
555 else: 556 else:
556 trunk = gettrunkrev(svnbase) 557 sourcefolder = workfolder + "/" + program + "-r" + str(revision) + versionextra + "/"
557 sourcefolder = workfolder + "/" + program + "-r" + str(trunk) + versionextra + "/" 558 archivename = program + "-r" + str(revision) + versionextra + "-src.tar.bz2"
558 archivename = program + "-r" + str(trunk) + versionextra + "-src.tar.bz2" 559 ver = "r" + str(revision)
559 ver = "r" + str(trunk)
560 os.mkdir(sourcefolder) 560 os.mkdir(sourcefolder)
561 else: 561 else:
562 workfolder = "." 562 workfolder = "."
@@ -583,11 +583,11 @@ def deploy():
583 for r in regreplace[f]: 583 for r in regreplace[f]:
584 # replacements made on the replacement string: 584 # replacements made on the replacement string:
585 # %REVISION% is replaced with the revision number 585 # %REVISION% is replaced with the revision number
586 replacement = re.sub("%REVISION%", str(trunk), r[1]) 586 replacement = re.sub("%REVISION%", str(revision), r[1])
587 # %BUILD% is replace with buildid as passed on the command line 587 # %BUILD% is replace with buildid as passed on the command line
588 if buildid != None: 588 if buildid != None:
589 replacement = re.sub("%BUILDID%", str(buildid), replacement) 589 replacement = re.sub("%BUILDID%", str(buildid), replacement)
590 newline = re.sub(r[0], replacement, newline) 590 newline = re.sub(r[0], replacement, newline)
591 outfile.write(newline) 591 outfile.write(newline)
592 outfile.close() 592 outfile.close()
593 593