Skip to content

Commit

Permalink
git-version-gen: Prevent multiple lines of output
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias committed Apr 30, 2023
1 parent f1ff5ca commit 8bfb648
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-version-gen
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SRCDIR=`dirname $0`
if test -n "$1"; then
VER=$1
else
if test -d "${SRCDIR}/.git" && test -x "`which git`" ; then
if test -r "${SRCDIR}/.git" && test -x "`which git`" ; then
git update-index -q --refresh
if ! VER=`git describe --tags --dirty 2>/dev/null`; then
COMMIT=`git rev-parse --short HEAD`
Expand All @@ -16,4 +16,5 @@ else
fi
fi
fi
VER=`printf %s "$VER" | head -n1`
printf %s "$VER"

0 comments on commit 8bfb648

Please sign in to comment.