diff --git a/helpers/check-abi.py b/helpers/check-abi.py --- a/helpers/check-abi.py +++ b/helpers/check-abi.py @@ -42,6 +42,7 @@ if released: # get the first released version, that is available candidate = min(released, key=lambda i: HASH2TAG[i['scmRevision']]) + logging.info("Found tag %s(%s) to check against.", HASH2TAG[candidate['scmRevision']].version, candidate['scmRevision']) else: #TODO: we may want to return None, as the library was never released so far. @@ -81,11 +82,14 @@ scmRevision = subprocess.check_output(["git", "log", "--format=%H", "-n 1", "HEAD"]).strip().decode() # get all tags that are in the current commit -tags = subprocess.check_output(["git", "tag", "--contains", scmRevision]).strip().decode().splitlines() +tags = subprocess.check_output(["git", "tag", "--merged", scmRevision]).strip().decode().splitlines() + +# we are not interessed in the commit for annotatated tags itself, we want to know what commit was tagged. +commitedTags = [i+"^{}" for i in tags] # resolve tags -> git hashes -taghashes = subprocess.check_output(["git", "rev-parse", *tags]).strip().decode().splitlines() -HASH2TAG = {taghashes[pos]:Version(tag) for pos, tag in enumerate(tags)} +tagHashes = subprocess.check_output(["git", "rev-parse", *commitedTags]).strip().decode().splitlines() +HASH2TAG = {tagHashes[pos]:Version(tag) for pos, tag in enumerate(tags)} # Do we want to check for newer SONAMEs on other buildGroups keepBuildGroup = False @@ -136,6 +140,7 @@ for l in libraries: library = l.library libname = library['libname'] + logging.info("Do an ABI check for %s", libname) candidate = l.candidate() if not candidate: logging.info("Did not found any older build for %s, nothing to check ABI against.",libname) @@ -145,7 +150,7 @@ newLibraryPath, _ = ourArchive.retrievePackage(l.packageName) oldLibraryPath, _ = ourArchive.retrievePackage(candidate['packageName']) - logging.info("Let's do a ABI check %s against %s", library['scmRevision'], candidate['scmRevision']) + logging.info("check %s(old) -> %s(new)", candidate['scmRevision'], library['scmRevision']) # check ABI and write compat reports cmd = ["abi-compliance-checker",