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:
+1
-1
@@ -195,7 +195,7 @@ fi
|
||||
|
||||
function setversionvars {
|
||||
if [ ! -z "$USEGITVER" ]; then
|
||||
VER=`git describe`
|
||||
VER=`git describe --tags`
|
||||
VER=${VER/-/.post}
|
||||
VER=${VER/-/.}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user