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 <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5492
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Michal Berger 2020-12-09 00:16:02 +01:00 committed by Tomasz Zawadzki
parent 11b5e6f952
commit b33a9d9ca3

View File

@ -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) 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" output_dir="$GIT_REPOS/spdk_abi_latest"
elif [[ "$version" == "LTS" ]]; then elif [[ "$version" == "LTS" ]]; then
release="LTS" release=$(git -C "$GIT_REPOS/spdk_repo/spdk" describe LTS)
output_dir="$GIT_REPOS/spdk_abi_lts" output_dir="$GIT_REPOS/spdk_abi_lts"
fi fi
@ -38,7 +38,7 @@ function install_refspdk() {
git -C "$output_dir" checkout "$release" git -C "$output_dir" checkout "$release"
git -C "$output_dir" submodule update --init git -C "$output_dir" submodule update --init
lts_2001_fallback=false lts_2001_fallback=false
if [[ $(git -C "$output_dir" describe --tags) == v20.01* ]]; then if [[ "$release" == v20.01* ]]; then
lts_2001_fallback=true lts_2001_fallback=true
fi fi