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:
parent
f75b11d143
commit
2350da51e5
@ -1,11 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# add git revision to autojump
|
# add git revision to autojump
|
||||||
gitrevision=`git rev-parse HEAD`
|
gitrevision=`git describe`
|
||||||
if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then
|
if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then
|
||||||
gitrevision=$gitrevision"-dirty"
|
gitrevision=$gitrevision"-dirty"
|
||||||
fi
|
fi
|
||||||
sed -e "s/^AUTOJUMP_VERSION = \".*\"$/AUTOJUMP_VERSION = \"git revision $gitrevision\"/" autojump > autojump-version
|
sed -e "s/^AUTOJUMP_VERSION = \".*\"$/AUTOJUMP_VERSION = \"git revision $gitrevision\"/" autojump > autojump-version
|
||||||
mv -f autojump-version autojump
|
mv -f autojump-version autojump
|
||||||
chmod a+rw autojump
|
chmod a+rw autojump
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user