Remove 'heads/' string from git branch name #4695
This commit is contained in:
parent
9b3d6d5665
commit
5faa5178b4
|
@ -1440,10 +1440,16 @@ class InternalCommands:
|
||||||
raise Exception('Could not find package name with pattern: ' + pattern)
|
raise Exception('Could not find package name with pattern: ' + pattern)
|
||||||
|
|
||||||
def dist_name_rev(self, type):
|
def dist_name_rev(self, type):
|
||||||
|
branch = "heads/" + self.getGitBranchName()
|
||||||
|
revision = self.getGitRevision()
|
||||||
|
|
||||||
|
# sometimes, git will prepend "heads/" infront of the branch name,
|
||||||
|
# remove this as it's not useful to us and causes ftp issues.
|
||||||
|
branch = re.sub("heads/", "", branch)
|
||||||
|
|
||||||
# find the version number (we're puting the rev in after this)
|
# find the version number (we're puting the rev in after this)
|
||||||
pattern = '(\d+\.\d+\.\d+)'
|
pattern = '(\d+\.\d+\.\d+)'
|
||||||
replace = "%s-%s" % (
|
replace = "%s-%s" % (branch, revision)
|
||||||
self.getGitBranchName(), self.getGitRevision())
|
|
||||||
return re.sub(pattern, replace, self.dist_name(type))
|
return re.sub(pattern, replace, self.dist_name(type))
|
||||||
|
|
||||||
def getDebianArch(self):
|
def getDebianArch(self):
|
||||||
|
|
Loading…
Reference in New Issue