2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-21 08:33:20 +00:00

fix(build): describe git version from lightweight tags too

A USEGITVER=1 build derives its version with `git describe`, which only
considers annotated tags. xCAT tags releases with lightweight tags, so in a
tree without a reachable annotated tag `git describe` fails and VER comes out
empty, producing a broken package version.

Use `git describe --tags` so lightweight tags are considered.

Recovered from the unmerged lenovobuild branch (original 25248d19; the
commit's .post->.POST rename and its makegenesisbuilderrpm hunk are omitted
-- the former is an unrelated RPM-sort preference and the latter targets a
script no longer present on master).

Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com>
This commit is contained in:
Vinícius Ferrão
2026-07-21 19:29:11 -03:00
parent cf44f51463
commit f83817014b
+1 -1
View File
@@ -195,7 +195,7 @@ fi
function setversionvars {
if [ ! -z "$USEGITVER" ]; then
VER=`git describe`
VER=`git describe --tags`
VER=${VER/-/.post}
VER=${VER/-/.}
else