Configure git-archive to export information for setuptools_scm.
This requires git>=2.32.0.
This commit is contained in:
parent
732d62eb24
commit
37623c69a0
4
.git_archival.txt
Normal file
4
.git_archival.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
node: $Format:%H$
|
||||||
|
node-date: $Format:%cI$
|
||||||
|
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
|
||||||
|
ref-names: $Format:%D$
|
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -1 +1,2 @@
|
||||||
|
.git_archival.txt export-subst
|
||||||
/amaranth/vendor/* -linguist-vendored
|
/amaranth/vendor/* -linguist-vendored
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -4,9 +4,7 @@ from setuptools_scm.git import parse as parse_git
|
||||||
|
|
||||||
def doc_version():
|
def doc_version():
|
||||||
git = parse_git(".")
|
git = parse_git(".")
|
||||||
if not git:
|
if git.exact:
|
||||||
return ""
|
|
||||||
elif git.exact:
|
|
||||||
return git.format_with("v{tag}")
|
return git.format_with("v{tag}")
|
||||||
else:
|
else:
|
||||||
return "latest"
|
return "latest"
|
||||||
|
|
Loading…
Reference in a new issue