mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-20 08:18:24 +00:00
CI: Use --abbrev=9
explicitly for abbreviated commit hash
A length of the result of `git log -1 --pretty=format:%h` could vary over different CI systems, highly likely messing up their caching mechanisms. This commit is to use an option `--abbrev=9` to standardize the length to 9 characters for CI. Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
This commit is contained in:
@@ -113,7 +113,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 --abbrev=9 --pretty=format:"%h" ${file})${dirty}"
|
||||
popd &> /dev/null
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user