Changeset View
Changeset View
Standalone View
Standalone View
helpers/create-abi-bump.py
Show First 20 Lines • Show All 222 Lines • ▼ Show 20 Line(s) | |||||
223 | # Initialize the archive manager | 223 | # Initialize the archive manager | ||
224 | ourArchive = Packages.Archive(arguments.environment, 'ABIReference', usingCache = False) | 224 | ourArchive = Packages.Archive(arguments.environment, 'ABIReference', usingCache = False) | ||
225 | 225 | | |||
226 | for lib in libs: | 226 | for lib in libs: | ||
227 | lib.createABIDump() | 227 | lib.createABIDump() | ||
228 | 228 | | |||
229 | fileName = "abi_dumps/{name}/{name}_{version}.abi.tar.gz".format(name=lib.name,version=lib.version) # can replaced with f-String in python 3.6 | 229 | fileName = "abi_dumps/{name}/{name}_{version}.abi.tar.gz".format(name=lib.name,version=lib.version) # can replaced with f-String in python 3.6 | ||
230 | srcRevision = max([t['SONAME'] for t in lib.targets.values()]) # a more hackish way, to save the SONAME in the metadata | 230 | srcRevision = max([t['SONAME'] for t in lib.targets.values()]) # a more hackish way, to save the SONAME in the metadata | ||
231 | ourArchive.extraMetadata["SONAME"] = max([t['SONAME'] for t in lib.targets.values()]) # use max because there may be more than one lib inside | ||||
232 | ourArchive.extraMetadata["version"] = lib.version | ||||
233 | ourArchive.extraMetadata["libname"] = lib.name | ||||
234 | ourArchive.extraMetadata["targets"] = lib.targets.keys() | ||||
231 | ourArchive.storePackage(lib.name, fileName, srcRevision) | 235 | ourArchive.storePackage(lib.name, fileName, srcRevision) |