From ceb4d6bb5fd24aa5a0c53e2d8f73f5a5a7d77a34 Mon Sep 17 00:00:00 2001 From: Nolan Brubaker Date: Mon, 30 Sep 2019 19:18:32 -0400 Subject: [PATCH] Add tag calculation debugging Signed-off-by: Nolan Brubaker --- hack/gcr-push.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hack/gcr-push.sh b/hack/gcr-push.sh index f8ff8d104..f7ad36fb7 100755 --- a/hack/gcr-push.sh +++ b/hack/gcr-push.sh @@ -36,12 +36,18 @@ function highest_release() { # As an example, if v1.3.0 exists and we create v1.2.2, v1.3.0 should still be `latest`. # `git describe --tags $(git rev-list --tags --max-count=1)` would return the most recently made tag. + echo "Showing all tags." + git tag -l --sort=-v:refname + for t in $(git tag -l --sort=-v:refname); do + echo "Checking tag $t" # If the tag has alpha, beta or rc in it, it's not "latest" if [[ "$t" == *"beta"* || "$t" == *"alpha"* || "$t" == *"rc"* ]]; then + echo "Skipping tag $t" continue fi + echo "Found highest at $t" HIGHEST="$t" break done