Skip to content

VERSION string not correctly set-up #1380

@rabser

Description

@rabser

Version:

  • listmonk: v2.4.0
  • OS: any

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 := $(or $(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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions