You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

git.defs 301B

123456789
  1. def git_version():
  2. import subprocess
  3. cmd = ['git', 'describe', '--always', '--match', 'v[0-9].*', '--dirty']
  4. p = subprocess.Popen(cmd, stdout = subprocess.PIPE)
  5. v = p.communicate()[0].strip()
  6. r = p.returncode
  7. if r != 0:
  8. raise subprocess.CalledProcessError(r, ' '.join(cmd))
  9. return v