YosysHQ / prjtrellis

Documenting the Lattice ECP5 bit-stream format.
Other
399 stars 87 forks source link

Make CURRENT_GIT_VERSION logic robust in release tarballs #227

Open DanielG opened 1 year ago

DanielG commented 1 year ago

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.