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:
parent
68c4faa3f8
commit
56ed6b5161
|
|
@ -59,7 +59,9 @@ scm_version()
|
||||||
# If we are past a tagged commit (like
|
# If we are past a tagged commit (like
|
||||||
# "v2.6.30-rc5-302-g72357d5"), we pretty print it.
|
# "v2.6.30-rc5-302-g72357d5"), we pretty print it.
|
||||||
if atag="`git describe 2>/dev/null`"; then
|
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}.
|
# If we don't have a tag at all we print -g{commitish}.
|
||||||
else
|
else
|
||||||
|
|
@ -77,6 +79,8 @@ scm_version()
|
||||||
printf '%s' -dirty
|
printf '%s' -dirty
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf ' \#%s' $USER
|
||||||
|
|
||||||
# All done with git
|
# All done with git
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue