fixed "hm dist src" command to support branches
also allowed non-unix platforms to run src
This commit is contained in:
parent
f3218ff53c
commit
7abcf13317
|
@ -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,9 +1220,13 @@ 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))
|
||||
|
||||
|
|
Loading…
Reference in New Issue