Commit d495c9b2 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

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: default avatarMichal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5493


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
parent b33a9d9c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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