cobertura-merge
cobertura-merge copied to clipboard
Can we have file pattern support in addition/instead of multiple file inputs
In enterprise projects where the coverage results' files are huge and dynamic in nature, can we pass on a 'FILE_PATTERN' instead of supplying individual inputs?
Hello, are there any updates? seems like usefull feature? or maybe anyone could recommend alternative solutions?
A workaround:
npx cobertura-merge -p -o output.xml $(ls coverage/**/cobertura-coverage.xml | awk -v ORS=" " -v OFS="" '{ print "package", NR, "=", $0 }')
working script for me
npx cobertura-merge -p -o coverage/cobertura-coverage.xml $(find coverage -type f -name 'cobertura-coverage.xml' | awk -v ORS=" " -v OFS="" '{ print "package", NR, "=", $0 }')
find coverage -type f -name 'cobertura-coverage.xml' | awk -v ORS=" " -v OFS="" '{ print "package", NR, "=", $0 }'
package1=coverage/apps/app1/cobertura-coverage.xml package2=coverage/apps/app2/cobertura-coverage.xml
package3=coverage/libs/app3/cobertura-coverage.xml