1
0
Fork 0
mirror of synced 2024-05-29 05:21:11 -04:00

Include Git version with yadm version (#377)

This commit is contained in:
Tim Byrne 2022-01-17 09:12:41 -06:00
parent f28d4bc1c6
commit 8186705059
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12
2 changed files with 4 additions and 3 deletions

View file

@ -29,8 +29,8 @@ def test_semantic_version(expected_version):
@pytest.mark.parametrize('cmd', ['--version', 'version']) @pytest.mark.parametrize('cmd', ['--version', 'version'])
def test_reported_version( def test_reported_version(
runner, yadm_cmd, cmd, expected_version): runner, yadm_cmd, cmd, expected_version):
"""Report correct version""" """Report correct version, include git version"""
run = runner(command=yadm_cmd(cmd)) run = runner(command=yadm_cmd(cmd))
assert run.success assert run.success
assert run.err == '' assert run.err == ''
assert run.out == f'yadm {expected_version}\n' assert run.out.startswith(f'yadm version {expected_version}\ngit version')

3
yadm
View file

@ -1413,7 +1413,8 @@ function upgrade() {
function version() { function version() {
echo "yadm $VERSION" echo "yadm version $VERSION"
"$GIT_PROGRAM" --version
exit_with_hook 0 exit_with_hook 0
} }