Files
DefiLlama-Adapters/.github/workflows/getFileList.js
2022-05-03 12:54:28 +05:30

14 lines
418 B
JavaScript

const MODIFIED = parse(process.env.MODIFIED)
const ADDED = parse(process.env.ADDED)
const fileSet = new Set();
[...MODIFIED, ...ADDED].forEach(file => {
const [root, dir] = file.split('/')
if (root === 'projects' && dir !=='helper' && dir !== 'config') fileSet.add(root + '/' + dir)
})
console.log(JSON.stringify([...fileSet]))
function parse(data) {
return data.replace('[', '').replace(']', '').split(',')
}