From b2a74dc9fceefd88a25c3a7821452fbea4a0c557 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Fri, 11 Sep 2020 16:01:52 +0800 Subject: [PATCH] Fix lint version not pulling tags. --- infra/scripts/validate-version-consistency.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index 2bb019dc8a..896de18b14 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -9,7 +9,10 @@ # versions against the given merge branch. set -e +# Fetch tags and current branch +git fetch --prune --unshallow --tags || true BRANCH_NAME=${TARGET_MERGE_BRANCH-$(git rev-parse --abbrev-ref HEAD)} + # Matches (ie vMAJOR.MINOR-branch) release branch names RELEASE_BRANCH_REGEX="^v[0-9]+\.[0-9]+-branch$"