Skip to content

Commit 9ea57a0

Browse files
committed
Make .git_archival.txt more reproducible
1 parent d081257 commit 9ea57a0

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.git_archival.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node: $Format:%H$
22
node-date: $Format:%cI$
33
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
4-
ref-names: $Format:%D$

docs/usage.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,19 @@ Ensure the content of the following files:
235235
node: $Format:%H$
236236
node-date: $Format:%cI$
237237
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
238-
ref-names: $Format:%D$
239238
```
240239

240+
Feel free to alter the `match` field in `describe-name` to match your project's
241+
tagging style.
242+
243+
!!! note
244+
245+
If your git host provider does not properly expand `describe-name`, you may
246+
need to include `ref-names: $Format:%D$`. But **beware**, this can often
247+
lead to the git archive's checksum changing after a commit is added
248+
post-release. See [this issue][git-archive-issue] for more details.
249+
250+
241251
``` {.text file=".gitattributes"}
242252
.git_archival.txt export-subst
243253
```
@@ -251,7 +261,7 @@ $ git add .git_archival.txt .gitattributes && git commit -m "add export config"
251261
Note that if you are creating a `_version.py` file, note that it should not
252262
be kept in version control. It's strongly recommended to be put into gitignore.
253263

254-
264+
[git-archive-issue]: https://github.com/pypa/setuptools_scm/issues/806
255265

256266
### File finders hook makes most of `MANIFEST.in` unnecessary
257267

src/setuptools_scm/.git_archival.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node: $Format:%H$
22
node-date: $Format:%cI$
33
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
4-
ref-names: $Format:%D$

0 commit comments

Comments
 (0)