Skip to content

Commit dc3acca

Browse files
committed
Capture version in archives with .git_archival.txt
The .git_archival.txt file is configured (via .gitattributes) to be formatted at `git archive` time with the ref names associated with the archive. When archiving a tag, the tag name(s) will appear in the archived .git_archival.txt file as 'ref-names: tag: vX.Y, ...'. N.B. this .git_archival.txt file is compatible with the setuptools_scm setuptools_scm_git_archive plugin. However, that toolchain is not being used at this time. Signed-off-by: Peter Grayson <[email protected]>
1 parent be4b8a5 commit dc3acca

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.git_archival.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ref-names: $Format:%D$

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git_archival.txt export-subst

0 commit comments

Comments
 (0)