Skip to content

Commit

Permalink
feat(build): Add Git archives version files
Browse files Browse the repository at this point in the history
When downloading the source code of a branch or a release from GitHub or the mirror, there is no Git version information, making setuptools-scm unable to read the version. The alternative way is to add a git archive file supported by setuptools-scm. See:
* https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives (available in setuptools-scm 7.0.0)
* https://git-scm.com/docs/git-archive#Documentation/git-archive.txt-export-subst
* https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives

Generated by the task: njzjz-bot/njzjz-bot#4.
  • Loading branch information
njzjz-bot committed Apr 13, 2024
1 parent dcc9fa5 commit d7f15a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst

0 comments on commit d7f15a6

Please sign in to comment.