Icinga / docker-icingadb

GNU General Public License v2.0
3 stars 5 forks source link

Release builds report commit hash in version number #60

Open julianbrost opened 1 year ago

julianbrost commented 1 year ago
% docker run --rm -it icinga/icingadb:1.1.1 /icingadb --version
Icinga DB version: 1.1.1-g6c8b52f

Build information:
  Go version: go1.21.0 (linux, amd64)
  Git commit: 6c8b52f2033cd94466863c92d3df632e3c87743c

In contrast, our release packages report Icinga DB version: v1.1.1, i.e. the git tag.

Al2Klimov commented 7 months ago

This is because we build a checked out .git, not an extracted git-archive. https://github.com/Icinga/icingadb/blob/a0a65af0260b9821e4d72692b9c8fda545b6aeca/pkg/version/version.go#L29-L30