This automatically embeds git version information into tarballs built with git-archive. This even works for tarballs downloaded from Github.
Essentially the same trick as in https://github.com/YosysHQ/yosys/pull/3138 with one complication: git-tag information is not available to the export-subst (see gitattributes(5)) format string so we use the commit date instead.
We retain the current git-describe based string for git checkouts but it might be advisable to align this to be the HEAD commit date plus commit hash too.
This automatically embeds git version information into tarballs built with git-archive. This even works for tarballs downloaded from Github.
Essentially the same trick as in https://github.com/YosysHQ/yosys/pull/3138 with one complication: git-tag information is not available to the export-subst (see gitattributes(5)) format string so we use the commit date instead.
We retain the current git-describe based string for git checkouts but it might be advisable to align this to be the HEAD commit date plus commit hash too.