test pre-commit hook

This commit is contained in:
Sylvain Tricot 2019-11-15 15:27:33 +01:00
parent c0ad93cea0
commit 4e6316b567
1 changed files with 3 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import subprocess
from distutils.version import LooseVersion
def get_version():
p = subprocess.run(['git describe'], shell=True, stdout=subprocess.PIPE)
p = subprocess.run(["git describe|sed 's/-/.post/'|cut -d'-' -f1"], shell=True, stdout=subprocess.PIPE)
output = p.stdout.decode('utf-8')
return output
@ -64,3 +64,5 @@ def ask_new_version(current_version):
set_version(new_version)
ask_new_version(get_version())
#print(get_version())