packaging: Use git abbreviated hash

This will make it easier to build images that rely on several
directories hashes.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-09-27 14:19:24 +02:00
parent 8b25e90027
commit 98097c96de

View File

@ -123,7 +123,7 @@ get_last_modification() {
dirty=""
[ $(git status --porcelain | grep "${file#${repo_root_dir}/}" | wc -l) -gt 0 ] && dirty="-dirty"
echo "$(git log -1 --pretty=format:"%H" ${file})${dirty}"
echo "$(git log -1 --pretty=format:"%h" ${file})${dirty}"
popd &> /dev/null
}