From 4b2ce5f621d05f4cb64c29e8dd0933611ce43c31 Mon Sep 17 00:00:00 2001 From: Ali-Akber Saifee Date: Sat, 26 Aug 2023 15:19:51 -0700 Subject: [PATCH] Workaround extra refnames in git archive Instead of including all refnames that the tag points to use only tags to ensure git archive produces a stable build from a tag regardless of when the archive is created References: - https://github.com/python-versioneer/python-versioneer/issues/217 --- coredis/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coredis/_version.py b/coredis/_version.py index 1f45cef1..cd12c6ea 100644 --- a/coredis/_version.py +++ b/coredis/_version.py @@ -26,7 +26,7 @@ def get_keywords(): # setup.py/versioneer.py will grep for the variable names, so they must # each be defined on a line of their own. _version.py will just call # get_keywords(). - git_refnames = "$Format:%d$" + git_refnames = "$Format:%(describe:exclude=HEAD|main:tags=true)$" git_full = "$Format:%H$" git_date = "$Format:%ci$" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}