This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed "heads/" prepend problem for plugin upload #4695

  • Loading branch information...
Nick Bolton
Nick Bolton committed May 26, 2015
1 parent d6cefa7 commit efd01085974da90ee297f12e228719dfdce774b2
Showing with 7 additions and 5 deletions.
  1. +7 −5 ext/toolchain/commands1.py
View
@@ -972,7 +972,13 @@ def getGitBranchName(self):
if p.returncode != 0:
raise Exception('Could not get branch name, git error: ' + str(p.returncode))
- return stdout.strip()
+ result = stdout.strip()
+
+ # sometimes, git will prepend "heads/" infront of the branch name,
+ # remove this as it's not useful to us and causes ftp issues.
+ result = re.sub("heads/", "", result)
+
+ return result
def find_revision_svn(self):
if sys.version_info < (2, 4):
@@ -1443,10 +1449,6 @@ def dist_name_rev(self, type):
branch = 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)
pattern = '(\d+\.\d+\.\d+)'
replace = "%s-%s" % (branch, revision)

0 comments on commit efd0108

Please sign in to comment.