not using 'git -C path' which is not supported by git 1.x
'-C path' is new in git 2.x and RHEL 6 has git 1.8 by default Signed-off-by: Qixiang Wan <qwan@redhat.com>
This commit is contained in:
parent
1345eb87a4
commit
d067928a4e
@ -12,7 +12,7 @@ def get_full_version():
|
|||||||
location = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
|
location = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
|
||||||
if os.path.isdir(os.path.join(location, '.git')):
|
if os.path.isdir(os.path.join(location, '.git')):
|
||||||
import subprocess
|
import subprocess
|
||||||
proc = subprocess.Popen(['git', '-C', location, 'describe', '--tags'],
|
proc = subprocess.Popen(['git', '--git-dir=%s/.git' % location, 'describe', '--tags'],
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
output, _ = proc.communicate()
|
output, _ = proc.communicate()
|
||||||
return re.sub(r'-1.fc\d\d?', '', output.strip().replace('pungi-', ''))
|
return re.sub(r'-1.fc\d\d?', '', output.strip().replace('pungi-', ''))
|
||||||
|
Loading…
Reference in New Issue
Block a user