From d495c9b2226dcb4dfe3d33cbf0d8d4f4da40ebb2 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Wed, 9 Dec 2020 01:10:23 +0100 Subject: [PATCH] pkgdep/git: Force tag fetching and remove ref repo dirs before building --force will make sure that all pre-existing tags will be overwritten with those from remote (this concerns mostly LTS tag which is meant to be changed in the future to point at different releases). Cleanup is also necessary as we can't build against repos with old contents. Change-Id: I9f8c5521d828bed04ea1dc23fb8f3bf07aad1f23 Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5493 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Reviewed-by: Karol Latecki --- test/common/config/pkgdep/git | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/common/config/pkgdep/git b/test/common/config/pkgdep/git index 0a6963bf4..cfb353072 100644 --- a/test/common/config/pkgdep/git +++ b/test/common/config/pkgdep/git @@ -21,7 +21,7 @@ function install_refspdk() { version=$1 # Create a reference SPDK build for ABI tests - git -C "$GIT_REPOS/spdk_repo/spdk" fetch --tags + git -C "$GIT_REPOS/spdk_repo/spdk" fetch --tags --force if [[ "$version" == "latest" ]]; then release=$(git -C "$GIT_REPOS/spdk_repo/spdk" tag | sort --version-sort | grep -v rc | tail -n 1) @@ -31,6 +31,8 @@ function install_refspdk() { output_dir="$GIT_REPOS/spdk_abi_lts" fi + rm -rf "$output_dir" + if [[ ! -d $output_dir ]]; then cp -R "$GIT_REPOS/spdk_repo/spdk" "$output_dir" fi