Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
build: shallow clones don't properly report version number
This branches deb builder in such an environment (such as that used on
travis-ci)
  • Loading branch information
adamsutton committed Jan 16, 2016
1 parent 6e139c4 commit 15b19f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion support/version
Expand Up @@ -12,7 +12,9 @@ if [ -d ".git" ]; then
if [ $? -ne 0 ]; then
# Git describe failed, maybe "--dirty" option is not available
# Adding "-unknown" postfix to mark this situation
VER=$(cd "$(dirname "$0")/.."; git describe --match "v*" 2> /dev/null)-unknown
VER=$(cd "$(dirname "$0")/.."; git describe --match "v*" 2> /dev/null)
[ -z "$VER" ] && VER=0.0.0
VER=${VER}-unknown
fi
VER=$(echo $VER | sed "s/^v//" | sed "s/-\([0-9]*\)-\(g[0-9a-f]*\)/-\1~\2/")
elif [ -f "$(dirname "$0")/../debian/changelog" ]; then
Expand Down

0 comments on commit 15b19f8

Please sign in to comment.