`mitmproxy --version`: incorporate non-annotated tags
This commit is contained in:
parent
294eb32689
commit
89c3675741
|
@ -21,7 +21,7 @@ def get_dev_version() -> str:
|
|||
here = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
try:
|
||||
git_describe = subprocess.check_output(
|
||||
['git', 'describe', '--long'],
|
||||
['git', 'describe', '--tags', '--long'],
|
||||
stderr=subprocess.STDOUT,
|
||||
cwd=here,
|
||||
)
|
||||
|
|
|
@ -30,5 +30,5 @@ def test_get_version():
|
|||
m.return_value = b"tag-2-cafecafe"
|
||||
assert version.get_dev_version() == "3.0.0rc2 (+2, commit cafecaf)"
|
||||
|
||||
m.side_effect = subprocess.CalledProcessError(-1, 'git describe --long')
|
||||
m.side_effect = subprocess.CalledProcessError(-1, 'git describe --tags --long')
|
||||
assert version.get_dev_version() == "3.0.0rc2"
|
||||
|
|
Loading…
Reference in New Issue