1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

use git describe instead of rev-parse

This commit is contained in:
Johnny Kuan 2011-09-22 02:06:08 -07:00
parent f75b11d143
commit 2350da51e5

View File

@ -1,11 +1,9 @@
#!/usr/bin/env bash
# add git revision to autojump
gitrevision=`git rev-parse HEAD`
gitrevision=`git describe`
if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then
gitrevision=$gitrevision"-dirty"
fi
sed -e "s/^AUTOJUMP_VERSION = \".*\"$/AUTOJUMP_VERSION = \"git revision $gitrevision\"/" autojump > autojump-version
mv -f autojump-version autojump
chmod a+rw autojump