Skip to content

GIT_VERSION: Support both vX.Y.Z and X.Y.Z formats

Matthias Käppler requested to merge mk-dont-shadow-git-version into master

There is a problem with the Makefile where it overwrites GIT_VERSION that is already set in the container as per gitlab-build-images, and does so using a different format (vX.Y.Z instead of X.Y.Z).

This will lead to problems in envs where this variable is already set in the container by the base image, because it will override the one referenced in the Makefile and lead to missing refs (since there is no git tag called X.Y.Z).

Streamlining this across Gitlab would be a fair amount of work, so we opted for a workaround that accepts both formats and makes sure we always use the v* prefix when interpreting it as a git tag.

See also: gitlab-compose-kit!173 (closed)

Edited by Matthias Käppler

Merge request reports