diff --git a/.git_archival.txt b/.git_archival.txt new file mode 100644 index 0000000..8fb235d --- /dev/null +++ b/.git_archival.txt @@ -0,0 +1,4 @@ +node: $Format:%H$ +node-date: $Format:%cI$ +describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ +ref-names: $Format:%D$ diff --git a/.gitattributes b/.gitattributes index 208af66..5f2f45f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ +.git_archival.txt export-subst /amaranth/vendor/* -linguist-vendored diff --git a/setup.py b/setup.py index 56c67e2..d63e3f7 100644 --- a/setup.py +++ b/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"