Skip to content

Commit

Permalink
bee-download: fix handling of git repositories without tagged commits
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed Jan 24, 2012
1 parent 60dca2d commit 7a3c912
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/bee-download.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function download_git() {
git reset ${OPT_COMMIT} >/dev/null 2>&1
fi

gd=$(git describe --tags --long)
gd=$(git describe --tags --long --always)
commit=${gd##*-g}
gd=${gd%-*}
ahead=${gd##*-}
Expand All @@ -124,7 +124,13 @@ function download_git() {
PKGFULLVERSION=${PKGFULLVERSION//[^0-9.]/}
fi

pkgextraextraversion="_p${ahead}_${commit}"
if [ "$ahead" != "$gd" ] ; then
pkgextraextraversion="_p${ahead}"
else
PKGFULLVERSION=0
fi

pkgextraextraversion="${pkgextraextraversion}_${commit}"

filename=${OPT_PKGNAME:-${PKGNAME}}-${OPT_VERSION:-${PKGFULLVERSION}}${pkgextraextraversion}

Expand Down

0 comments on commit 7a3c912

Please sign in to comment.