Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The binaries built by the release action include the commit hash in their version #38

Open
ejpcmac opened this issue Sep 28, 2024 · 0 comments
Labels
A:CLI Area: CLI T:Bug Type: Bug
Milestone

Comments

@ejpcmac
Copy link
Owner

ejpcmac commented Sep 28, 2024

Problem description

If I run a binary downloaded from the release page and print its short version, I get the following:

$ ./git-z-0.2.1-x86_64-unknown-linux-musl -V
git-z 0.2.1+e0e62f1

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, 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.

@ejpcmac ejpcmac added this to the git-z 0.2.2 milestone Sep 28, 2024
@ejpcmac ejpcmac added A:CLI Area: CLI T:Bug Type: Bug labels Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:CLI Area: CLI T:Bug Type: Bug
Projects
Status: Backlog
Development

No branches or pull requests

1 participant