add helperscript to determine bundled versions

This commit is contained in:
Christopher Engelhard 2020-12-28 20:35:36 +01:00
parent de0b910396
commit bbad8d3a8c

26
get-bundled-versions.py Executable file
View File

@ -0,0 +1,26 @@
#!/bin/env python
import os
import json
for root, dirs, files in os.walk("apps"):
for file in files:
if file == 'composer.lock':
with open(os.path.join(root, file)) as f:
lockdata = json.load(f)
try:
for i in lockdata['packages']:
print("Provides: bundled(php-composer(" + i['name'] + ")) = " + i['version'].strip('v'))
except KeyError:
pass
for root, dirs, files in os.walk("3rdparty"):
for file in files:
if file == 'composer.lock':
with open(os.path.join(root, file)) as f:
lockdata = json.load(f)
try:
for i in lockdata['packages']:
print("Provides: bundled(php-composer(" + i['name'] + ")) = " + i['version'].strip('v'))
except KeyError:
pass