From 30eb91b7c277a1d8f59b640b11844084d7415c99 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 31 Jan 2018 12:25:22 -0500 Subject: [PATCH] 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 --- tools/functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/functions b/tools/functions index abe0529b42..d02a9d6c86 100644 --- a/tools/functions +++ b/tools/functions @@ -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 }