Enable support for custom versioning

Now that we're working on the 3.0.0 major release it is more important
than ever that fish binaries built by developers have version strings
which clearly communicate where they came from.
This commit is contained in:
Kurtis Rader
2017-08-15 12:21:43 -07:00
parent d407c22ee7
commit ea3e9698df
2 changed files with 7 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ DEF_VER=unknown
if test -f version
then
VN=$(cat version) || VN="$DEF_VER"
elif ! VN=$(git describe --always --dirty 2>/dev/null); then
elif ! VN=$(git rev-parse --abbrev-ref HEAD)/$(git describe --always --dirty --tags 2>/dev/null); then
VN="$DEF_VER"
fi