From 7abcf133173189a648133aeccb5a97ed1953db36 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Wed, 22 Oct 2014 14:06:15 +0100 Subject: [PATCH] fixed "hm dist src" command to support branches also allowed non-unix platforms to run src --- ext/toolchain/commands1.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py index 48a868f5..086a1915 100644 --- a/ext/toolchain/commands1.py +++ b/ext/toolchain/commands1.py @@ -1036,10 +1036,7 @@ class InternalCommands: moveExt = '' if type == 'src': - if sys.platform in ['linux2', 'darwin']: - self.distSrc() - else: - package_unsupported = True + self.distSrc() elif type == 'rpm': if sys.platform == 'linux2': @@ -1223,11 +1220,15 @@ class InternalCommands: print "Removing existing export..." shutil.rmtree(exportPath) - print 'Exporting repository to: ' + exportPath os.mkdir(exportPath) - err = os.system('git archive master | tar -x -C ' + exportPath) + + cmd = "git archive %s | tar -x -C %s" % ( + self.getGitBranchName(), exportPath) + + print 'Exporting repository to: ' + exportPath + err = os.system(cmd) if err != 0: - raise Exception('Repository export failed: ' + str(err)) + raise Exception('Repository export failed: ' + str(err)) packagePath = '../' + self.getGenerator().binDir + '/' + name + '.tar.gz'