diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/setlocalversion | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 1c1bdaf7348a..83b75126c9f7 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -12,7 +12,9 @@ cd "${1:-.}" || usage if head=`git rev-parse --verify HEAD 2>/dev/null`; then # Do we have an untagged version? if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then - git describe | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' + if tag=`git describe 2>/dev/null`; then + echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' + fi fi # Are there uncommitted changes? |