1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00
wting_autojump/git-version.sh
Johnny Kuan ceab9f505a use make for autojump and release tarball
autojump.py is now a source file, autojump is the 
executable with version information.
Makefile automatically looks for last tagged 
commit when making the release tar.gz
2011-09-21 09:59:01 -07:00

11 lines
321 B
Bash
Executable File

#!/usr/bin/env bash
# add git revision to autojump
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.py > autojump
chmod a+rx autojump