in git that matches the specified pattern.
This assumes that the current working directory is the deployment.
"""
+ sh = wizard.shell.Shell()
cmd = ['git', 'describe', '--match', tagPattern, ]
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE, )
- tag, _ = p.communicate()
- tag = tag.strip()
+ tag = sh.call(*cmd, strip=True)
if tag and len(tag) > len(preStrip) and tag[:len(preStrip)] == preStrip:
tag = tag[len(preStrip):]
if not tag: return None