aboutsummaryrefslogtreecommitdiffstats
path: root/.gitattributes
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2021-12-30 18:45:15 +0100
committerDaniel Gröber <dxld@darkboxed.org>2022-05-25 11:20:09 +0200
commit222e7a2da345f01980d9261c40c5d50eced4f9ab (patch)
treefd5c7802d19695997fd40f05ff534c053ac1937e /.gitattributes
parentcffec1f95f0ac4bad1deb24bf7f921bd93145a16 (diff)
downloadyosys-222e7a2da345f01980d9261c40c5d50eced4f9ab.tar.gz
yosys-222e7a2da345f01980d9261c40c5d50eced4f9ab.tar.bz2
yosys-222e7a2da345f01980d9261c40c5d50eced4f9ab.zip
Make GIT_REV logic work in release tarballs
Currently GIT_REV doesn't get set properly when building a release tarball. To fix this we arrange for .gitcommit to contain the (short) commit hash in tarballs generated with git-archive(1) using export-subst in gitattributes. This way the correct commit hash is (reproducibly) included in the release tarballs while not burdening the maintainers with updating it in the git repo. Please note this even works on Github and similar forges as they use git-archive for generating tarballs so this works out quite nicely.
Diffstat (limited to '.gitattributes')
-rw-r--r--.gitattributes1
1 files changed, 1 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
index f85ae06c9..5e568606e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,2 @@
*.v linguist-language=Verilog
+/.gitcommit export-subst