packaging(release): Properly handle version tag for the release bundle

The tags created automatically for published Github releases
are probably not annotated, so by simply running `git describe` we are
not getting the correct tag. Use a `git describe --tags` to allow git
to look at all tags, not just annotated ones.

Signed-off-by: Anastassios Nanos <ananos@nubificus.co.uk>
This commit is contained in:
Anastassios Nanos 2025-02-14 12:41:05 +00:00
parent d28410ed75
commit b13db29aaa

View File

@ -32,7 +32,7 @@ pushd ${tarball_content_dir}
shim_path=$(find . -name ${shim} | sort | head -1) shim_path=$(find . -name ${shim} | sort | head -1)
prefix=${shim_path%"bin/${shim}"} prefix=${shim_path%"bin/${shim}"}
echo "$(git describe)" > ${prefix}/VERSION echo "$(git describe --tags)" > ${prefix}/VERSION
[[ -n "${kata_versions_yaml_file}" ]] && cp ${kata_versions_yaml_file_path} ${prefix}/ [[ -n "${kata_versions_yaml_file}" ]] && cp ${kata_versions_yaml_file_path} ${prefix}/
popd popd