Skip to content

Commit d3d6b1a

Browse files
committed
Add git_hash to dump_file function in addition to version
1 parent 8ac404a commit d3d6b1a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/setuptools_scm/_integration/dump_version.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# file generated by setuptools-scm
1717
# don't change, don't track in version control
1818
19-
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
19+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple", "__git_hash__", "git_hash"]
2020
2121
TYPE_CHECKING = False
2222
if TYPE_CHECKING:
@@ -31,9 +31,13 @@
3131
__version__: str
3232
__version_tuple__: VERSION_TUPLE
3333
version_tuple: VERSION_TUPLE
34+
git_hash: str
35+
__git_hash__: str
3436
3537
__version__ = version = {version!r}
3638
__version_tuple__ = version_tuple = {version_tuple!r}
39+
40+
__git_hash__ = git_hash = {scm_version.node!r}
3741
""",
3842
".txt": "{version}",
3943
}

0 commit comments

Comments
 (0)