hledger icon indicating copy to clipboard operation
hledger copied to clipboard

github release binaries have incorrect --version strings

Open simonmichael opened this issue 4 years ago • 4 comments

As mentioned on #1739, the release binaries provided at https://github.com/simonmichael/hledger/releases/tag/1.23 have problems with their --version output, perhaps because tags were not pushed before building.

$ hledger-linux-static-x64/hledger-linux-static-x64 --version
hledger 47b5b6b, linux-x86_64

should say hledger 1.23-0-g47b5b6be0, linux-x86_64.

$ hledger-macos/hledger --version
hledger 1.22.99-378-g47b5b6be0, mac-x86_64

should say hledger 1.23-0-g47b5b6be0, mac-x86_64.

> hledger-windows\hledger --version

Probably similar issues ?

simonmichael avatar Oct 24 '21 19:10 simonmichael

Was this an issue with the release procedure, or a technical issue which we need to fix?

Xitian9 avatar Nov 16 '21 00:11 Xitian9

hledger 1.24. This issue was not fixed.

$ ./hledger-linux-static-x64 --version
hledger f0f830e, linux-x86_64

Other issue is that version is not in ZIP archive filename, it is like hledger-linux-static-x64.zip, the same for all releases...

https://github.com/simonmichael/hledger/releases

PSLLSP avatar Dec 05 '21 14:12 PSLLSP

Merging #1769 here:

The hledger-linux-static-x64 binaries at https://hledger.org/download.html#gnulinux do not show the expected version output similar to https://hledger.org/download.html#test-your-installation ("hledger 1.24-0-gf0f830e06, linux..."). They show the correct git hash, but not the rest. We are not fixing this immediately as it would mean changing the hash in all release binaries. The workflow has been fixed, so the next major/minor release should be correct.

The hledger-linux-static-arm32v7 binaries may or may not be similarly affected.

This is a consequence of using gitrev to generate the version string from current git repo state at compile time. Mistakes with this are quite easy to make and quite costly. Eg It's important to have a full git clone, not a partial one, and also to have pushed the release tag(s) to the CI branch before building. We should perhaps test this in all workflows that build release binaries, causing them to fail if the final --version output looks wrong in any way.

simonmichael avatar Dec 05 '21 18:12 simonmichael

I don't know whether more action is needed to fix this in the hledger-linux-static-arm32v7 binary; currently that is not building at all as it times out at 6 hours.

Re putting the version in zip file name, I felt it was probably not necessary and easier for all if the filenames remained simple and stable. Is that wrong ?

simonmichael avatar Dec 05 '21 18:12 simonmichael

This seems fixed/no longer relevant.

simonmichael avatar Jun 24 '23 05:06 simonmichael