Merge "fix get_last_tag function"

This commit is contained in:
Zuul 2018-02-02 18:15:32 +00:00 committed by Gerrit Code Review
commit b10c9a4349
1 changed files with 2 additions and 2 deletions

View File

@ -56,10 +56,10 @@ function get_last_tag {
# Print the most recent tag for a ref. If no ref is specified, the
# currently checked out branch is examined.
local ref="$1"
if ! git describe --abbrev=0 --first-parent ${ref} >/dev/null 2>&1; then
if ! git describe --abbrev=0 ${ref} >/dev/null 2>&1; then
echo ""
else
git describe --abbrev=0 --first-parent ${ref}
git describe --abbrev=0 ${ref}
fi
}