Configure git-archive to export information for setuptools_scm.
This requires git>=2.32.0.
This commit is contained in:
parent
732d62eb24
commit
37623c69a0
3 changed files with 6 additions and 3 deletions
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
|
||||
|
|
|
|||
4
setup.py
4
setup.py
|
|
@ -4,9 +4,7 @@ from setuptools_scm.git import parse as parse_git
|
|||
|
||||
def doc_version():
|
||||
git = parse_git(".")
|
||||
if not git:
|
||||
return ""
|
||||
elif git.exact:
|
||||
if git.exact:
|
||||
return git.format_with("v{tag}")
|
||||
else:
|
||||
return "latest"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue