Commit 2104eacf authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Ben Walker
Browse files

test/check_so_deps: use VERSION to look for prior tags



The check_so_deps script compares the ABI of the current commit from the
ABI of the previous release.  It used to find the previous release by
looking at the first non-LTS, non-*pre tag and extracting the version
from that tag.  This means that after any other tag is placed, it'll be
used to figure out the release to test against.

Instead, use VERSION to find the release tag to compare against.  That
way, as long as VERSION points to a -pre tag, we can place any number of
-rc tags without breaking the ABI tests.  And, once a release branch is
created, VERSION would get updated to the -rc tag that points to the
first commit on that branch, so the subsequent commits would be compared
to the ABI of that release.

Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I1b4f9118e6d3749e0c43da3fa917c08868796eb9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/25524


Reviewed-by: default avatarBen Walker <ben@nvidia.com>
Reviewed-by: default avatarJim Harris <jim.harris@nvidia.com>
Community-CI: Community CI Samsung <spdk.community.ci.samsung@gmail.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 66289a6d
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -88,9 +88,18 @@ function check_header_filenames() {
}

function get_release() {
	local tag
	local tag version major minor patch suffix

	tag=$(git describe --tags --abbrev=0 --exclude=LTS --exclude="*-pre" $1)
	if [[ -n "$1" ]]; then
		version="$1"
	else
		IFS='.-' read -r major minor patch suffix < "$rootdir/VERSION"
		version="v$major.$minor"
		((patch > 0)) && version+=".$patch"
		version+=${suffix:+-$suffix}
	fi

	tag=$(git describe --tags --abbrev=0 --exclude=LTS --exclude="*-pre" "$version")
	echo "${tag:0:6}"
}