Commit 1d0f3ed4 authored by Sandro Knauß's avatar Sandro Knauß Committed by Ben Cooksley

Resolve tags to the commit, that was tagged.

Differential Revision:
parent 51b13c44
......@@ -42,6 +42,7 @@ class Library:
if released:
# get the first released version, that is available
candidate = min(released, key=lambda i: HASH2TAG[i['scmRevision']])"Found tag %s(%s) to check against.", HASH2TAG[candidate['scmRevision']].version, candidate['scmRevision'])
#TODO: we may want to return None, as the library was never released so far.
......@@ -81,11 +82,14 @@ if not scmRevision:
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 @@ retval = 0
for l in libraries:
library = l.library
libname = library['libname']"Do an ABI check for %s", libname)
candidate = l.candidate()
if not candidate:"Did not found any older build for %s, nothing to check ABI against.",libname)
......@@ -145,7 +150,7 @@ for l in libraries:
newLibraryPath, _ = ourArchive.retrievePackage(l.packageName)
oldLibraryPath, _ = ourArchive.retrievePackage(candidate['packageName'])"Let's do a ABI check %s against %s", library['scmRevision'], candidate['scmRevision'])"check %s(old) -> %s(new)", candidate['scmRevision'], library['scmRevision'])
# check ABI and write compat reports
cmd = ["abi-compliance-checker",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment