Changeset View
Changeset View
Standalone View
Standalone View
helpers/create-abi-bump.py
Show First 20 Lines • Show All 228 Lines • ▼ Show 20 Line(s) | |||||
229 | scmRevision = '' | 229 | scmRevision = '' | ||
230 | if os.getenv('GIT_COMMIT') != '': | 230 | if os.getenv('GIT_COMMIT') != '': | ||
231 | scmRevision = os.getenv('GIT_COMMIT') | 231 | scmRevision = os.getenv('GIT_COMMIT') | ||
232 | 232 | | |||
233 | for lib in libs: | 233 | for lib in libs: | ||
234 | lib.createABIDump() | 234 | lib.createABIDump() | ||
235 | 235 | | |||
236 | 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 | 236 | 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 | ||
237 | scmRevision = max([t['SONAME'] for t in lib.targets.values()]) # a more hackish way, to save the SONAME in the metadata | 237 | extraMetadata = { | ||
238 | "SONAME": max([t['SONAME'] for t in lib.targets.values()]), # use max because there may be more than one lib inside | ||||
239 | "version": lib.version, | ||||
240 | "libname": lib.name, | ||||
241 | "targets": lib.targets.keys(), | ||||
242 | } | ||||
238 | packageName = "{name}_{scmRevision}".format(name=lib.name, scmRevision=scmRevision) | 243 | packageName = "{name}_{scmRevision}".format(name=lib.name, scmRevision=scmRevision) | ||
239 | ourArchive.storePackage(packageName, fileName, scmRevision) | 244 | ourArchive.storePackage(packageName, fileName, scmRevision, extraMetadata) |