Merge "setlocalversion: Include post Linus git tags in LOCALVERSION_AUTO" into msm-3.0
This commit is contained in:
committed by
QuIC Gerrit Code Review
commit
f0724bcda2
@@ -55,16 +55,17 @@ scm_version()
|
||||
echo "+"
|
||||
return
|
||||
fi
|
||||
# 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))}'
|
||||
|
||||
# If we don't have a tag at all we print -g{commitish}.
|
||||
else
|
||||
printf '%s%s' -g $head
|
||||
fi
|
||||
fi
|
||||
# If we are past a tagged commit (like
|
||||
# "v2.6.30-rc5-302-g72357d5"), we pretty print it but strip
|
||||
# off the v2.6.30-rc5 part because that's in the Makefile.
|
||||
if atag="`git describe 2>/dev/null`"; then
|
||||
atag="-${atag/v$KERNELVERSION-/}"
|
||||
# If we don't have a tag at all we print -g{commitish}.
|
||||
else
|
||||
atag="-g$head"
|
||||
fi
|
||||
printf '%s' "$atag"
|
||||
|
||||
# Is this git on svn?
|
||||
if git config --get svn-remote.svn.url >/dev/null; then
|
||||
|
||||
Reference in New Issue
Block a user