fix get_last_tag function

Depending on how things merge into a branch, the --first-parent option
might give us the wrong version. For example, python-troveclient at
26425a6 was showing 2.13.0 instead of the correct 2.14.0. Remove the
option to fix that problem.

Change-Id: I9a6996b03dc74df6963ac96887356bc6094e59b7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-01-31 12:25:22 -05:00
parent 5f00e51c87
commit 30eb91b7c2

View File

@ -56,10 +56,10 @@ function get_last_tag {
# Print the most recent tag for a ref. If no ref is specified, the # Print the most recent tag for a ref. If no ref is specified, the
# currently checked out branch is examined. # currently checked out branch is examined.
local ref="$1" 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 "" echo ""
else else
git describe --abbrev=0 --first-parent ${ref} git describe --abbrev=0 ${ref}
fi fi
} }