Report a git-derived version from source checkouts
--version no longer shows the 0.0.0.dev0 placeholder when run from a checkout; it is derived lazily from git describe. Release binaries keep the version stamped from the tag and never invoke git. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
19a5373796
commit
926c0f0470
5 files changed
+173
-5
No files matched your search
+3
-3
@@ -6,9 +6,9 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from envbao import __version__
|
||||
from envbao.cli import init_config, main
|
||||
from envbao.errors import EXIT_AUTH, EXIT_CONFIG, EXIT_FAILURE, EXIT_OK, EXIT_UNAVAILABLE
|
||||
from envbao.version import get_version
|
||||
|
||||
from .conftest import TOKEN, FakeBao, write_config
|
||||
|
||||
@@ -171,7 +171,7 @@ def test_version(capsys: pytest.CaptureFixture[str]) -> None:
|
||||
with pytest.raises(SystemExit) as exc:
|
||||
main(["--version"])
|
||||
assert exc.value.code == 0
|
||||
assert __version__ in capsys.readouterr().out
|
||||
assert get_version() in capsys.readouterr().out
|
||||
|
||||
|
||||
# ---- init -----------------------------------------------------------------------------
|
||||
@@ -221,4 +221,4 @@ def test_python_dash_m(tmp_path: Path) -> None:
|
||||
check=True,
|
||||
env={**os.environ},
|
||||
)
|
||||
assert __version__ in result.stdout
|
||||
assert get_version() in result.stdout
|
||||
Reference in new issue
Block a user