-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
VERSION string not correctly set-up #1380
Comments
This isn't right. If it's a git repository,
Unfortunately, there is no way to get the latest tag of out of a |
Thanks for your kind reply. For the second problem, what I see it's that the VERSION file in the root folder is actualized with the right values, so the Makefile should be able to get the right numbers, IMHO the grep should be changed as I suggested: "tag: \K(.)(?=,)" should be "tag: \K(.)" and the versioning will be correctly composed. With the (?=,) the grep return an empty string (no match), and without it returns the v2.X.Y as expected: I'm wrong on this? |
Are you see the same values in the downloaded archive? It has the last commit, but not the version tag. I did some digging and looks like it's not possible to export tags during archival.
|
This is the cat VERSION from the source tar.gz taken from the "Releases" link:
the same happens with older ones, using the same url schema and changing the release number that you want to build. |
Version:
Description of the bug and steps to reproduce:
Building listmonk from a git clone, sets the VERSION string to the latest commit, even if the build is done from a checkout on another tag. Building listmonk from the source tar.gz (or zip) the VERSION string is set to 0.0.0.
Screenshots:
this is the result of a build starting from the tar.gz
[root@myhost Build]# ./listmonk --version
v0.0.0 (#c668523c 2023-06-20T12:48:35+0000)
I believe that line #5 in Makefile it's wrong (almost for the tar.gz) and should be as such:
VERSION := (shell git describe --tags --abbrev=0 2> /dev/null),$(shell grep -oP "tag: \K(.*)" VERSION),"v0.0.0")
where the bold part it's the relevant part.
For the build from git clone I was not able to find a pretty solution to substitute the git describe.
The text was updated successfully, but these errors were encountered: