scripts: setlocalversion: add more information

- add build username;
- add latest commit creation time.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If038927af085bd02707c0baa23e8ae321d3cae37
This commit is contained in:
Joseph Chen 2020-03-30 10:31:42 +08:00 committed by Jianhong Chen
parent 68c4faa3f8
commit 56ed6b5161
1 changed files with 5 additions and 1 deletions

View File

@ -59,7 +59,9 @@ scm_version()
# If we are past a tagged commit (like
# "v2.6.30-rc5-302-g72357d5"), we pretty print it.
if atag="`git describe 2>/dev/null`"; then
echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
echo "$atag" | awk -F- '{printf("-%s", $(NF))}'
date=`git log -1 --author='@rock-chips' --date=format:%y%m%d | sed -n '/Date:/p' | awk '{ print "-"$2 }'`
printf '%s' $date
# If we don't have a tag at all we print -g{commitish}.
else
@ -77,6 +79,8 @@ scm_version()
printf '%s' -dirty
fi
printf ' \#%s' $USER
# All done with git
return
fi