summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarsey Litzenberger <dlitz@dlitz.net>2022-10-13 21:46:23 -0600
committerDarsey Litzenberger <dlitz@dlitz.net>2022-10-14 03:46:44 -0600
commit501d80c8d7194379d08a63375645d9c166707ff4 (patch)
treee02882187510c1ce0f5e93e489c4349c547bb930
parent4c2cf6e3a369afa05131d6fb3d790822b019abf0 (diff)
downloadsetuptools-scm-501d80c8d7194379d08a63375645d9c166707ff4.tar.gz
Fix #759: Update .git_archival.txt templates to more closely match how we invoke git-describe
This covers `--tags` and `--match '*[0-9]*'` (and `--dirty` is unnecessary). There is unfortunately no format-string equivalent to git-describe's `--long` option, Archives made from this repository after this change should now get versioned correctly. Fixes: https://github.com/pypa/setuptools_scm/issues/759
-rw-r--r--.git_archival.txt2
-rw-r--r--README.rst2
-rw-r--r--src/setuptools_scm/.git_archival.txt2
3 files changed, 3 insertions, 3 deletions
diff --git a/.git_archival.txt b/.git_archival.txt
index 37d637d..8fb235d 100644
--- a/.git_archival.txt
+++ b/.git_archival.txt
@@ -1,4 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
-describe-name: $Format:%(describe)$
+describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
diff --git a/README.rst b/README.rst
index a02caf7..18f763c 100644
--- a/README.rst
+++ b/README.rst
@@ -316,7 +316,7 @@ and copy-paste this into it::
node: $Format:%H$
node-date: $Format:%cI$
- describe-name: $Format:%(describe:tags=true)$
+ describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
Create the ``.gitattributes`` file in the root directory of your repository
diff --git a/src/setuptools_scm/.git_archival.txt b/src/setuptools_scm/.git_archival.txt
index 37d637d..8fb235d 100644
--- a/src/setuptools_scm/.git_archival.txt
+++ b/src/setuptools_scm/.git_archival.txt
@@ -1,4 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
-describe-name: $Format:%(describe)$
+describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$