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 <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5493
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>
This commit is contained in:
Michal Berger 2020-12-09 01:10:23 +01:00 committed by Tomasz Zawadzki
parent b33a9d9ca3
commit d495c9b222

View File

@ -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