You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In releases, the short version should not contain the Git revision.
Analysis
In the different build jobs of the release action, the Git repository is cloned using actions/checkout@v4 without any parameter. By default, this only does a shallow clone, which does not include tags. Hence, the build.rs is not able to check whether the build is made from a tag matching the version, and the revision is then included.
Solution
Set fetch-tags: true in the parameters for actions/checkout@v4 for the build-bin, build-deb and build-msi jobs.
^ This solution makes the fetch fail. Replacing it with fetch-depth: 0 makes the build work again, but… does still include the hash.
The text was updated successfully, but these errors were encountered:
The `build.rs` includes the commit hash by default in the version, but
omits it when git-z is built exactly from a release tag. However, tags
were not fetched in the release builds, making them include the commit
hash even for releases.
Refs: #38
Problem description
If I run a binary downloaded from the release page and print its short version, I get the following:
Expected behaviour
In releases, the short version should not contain the Git revision.
Analysis
In the different build jobs of the release action, the Git repository is cloned using
actions/checkout@v4
without any parameter. By default, this only does a shallow clone, which does not include tags. Hence, thebuild.rs
is not able to check whether the build is made from a tag matching the version, and the revision is then included.Solution
Setfetch-tags: true
in the parameters foractions/checkout@v4
for thebuild-bin
,build-deb
andbuild-msi
jobs.^ This solution makes the fetch fail. Replacing it with
fetch-depth: 0
makes the build work again, but… does still include the hash.The text was updated successfully, but these errors were encountered: