Skip to content

Commit

Permalink
Include Git version with yadm version (yadm-dev#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLocehiliosan committed Jan 17, 2022
1 parent f28d4bc commit 8186705
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def test_semantic_version(expected_version):
@pytest.mark.parametrize('cmd', ['--version', 'version'])
def test_reported_version(
runner, yadm_cmd, cmd, expected_version):
"""Report correct version"""
"""Report correct version, include git version"""
run = runner(command=yadm_cmd(cmd))
assert run.success
assert run.err == ''
assert run.out == f'yadm {expected_version}\n'
assert run.out.startswith(f'yadm version {expected_version}\ngit version')
3 changes: 2 additions & 1 deletion yadm
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,8 @@ function upgrade() {

function version() {

echo "yadm $VERSION"
echo "yadm version $VERSION"
"$GIT_PROGRAM" --version
exit_with_hook 0

}
Expand Down

0 comments on commit 8186705

Please sign in to comment.