From b33a9d9ca3d10ecd005045f66f44271d45ab27bd Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Wed, 9 Dec 2020 00:16:02 +0100 Subject: [PATCH] pkgdep/git: Look up only annotated tags for refspdk builds Since --tags also works with lightweight tags, it simply returns "LTS" string when tree is switched directly to that particular tag. Make sure only annotated tags are checked so the release version lookup can work as expected. Change-Id: Ica875bf406c8e23529ee2961645c5bf6b6bc00fa Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5492 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Reviewed-by: Karol Latecki Reviewed-by: Aleksey Marchuk --- test/common/config/pkgdep/git | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/common/config/pkgdep/git b/test/common/config/pkgdep/git index 0af91038e..0a6963bf4 100644 --- a/test/common/config/pkgdep/git +++ b/test/common/config/pkgdep/git @@ -27,7 +27,7 @@ function install_refspdk() { release=$(git -C "$GIT_REPOS/spdk_repo/spdk" tag | sort --version-sort | grep -v rc | tail -n 1) output_dir="$GIT_REPOS/spdk_abi_latest" elif [[ "$version" == "LTS" ]]; then - release="LTS" + release=$(git -C "$GIT_REPOS/spdk_repo/spdk" describe LTS) output_dir="$GIT_REPOS/spdk_abi_lts" fi @@ -38,7 +38,7 @@ function install_refspdk() { git -C "$output_dir" checkout "$release" git -C "$output_dir" submodule update --init lts_2001_fallback=false - if [[ $(git -C "$output_dir" describe --tags) == v20.01* ]]; then + if [[ "$release" == v20.01* ]]; then lts_2001_fallback=true fi