9 tag = subprocess.check_output([
'git',
'describe',
'--tags',
'--abbrev=0',
'--always']).strip().decode(
'utf-8')
11 date = subprocess.check_output([
'git',
'log',
'-1',
'--format=%ai', tag]).strip().decode(
'utf-8')
12 return tag, datetime.strptime(date,
'%Y-%m-%d %H:%M:%S %z').strftime(
'%Y-%m-%d')
13 except subprocess.CalledProcessError:
14 print(
"Error: Unable to get git version.")