Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <[email protected]>
  • Loading branch information
jkowalleck committed May 15, 2024
1 parent 3e3c3ef commit f0fabd1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tools/write-3rd-party-licenses.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ It's sole existence is tailored to the needs of this project... not general purp
*/

const { spawnSync } = require('child_process')
const { basename } = require('path')
const {
readFileSync,
existsSync,
Expand Down Expand Up @@ -127,8 +126,11 @@ const tpLicenses = Array.from(
)

const outputFH = openSync(outputFile, 'w')
writeSync(outputFH, '<our own LICENSE file>\n')
writeSync(outputFH, '<our own NOTICE file>\n')

writeSync(outputFH, readFileSync(join(projectRoot, 'LICENSE')))
writeSync(outputFH, '\n')
writeSync(outputFH, readFileSync(join(projectRoot, 'NOTICE')))
writeSync(outputFH, '\n')
writeSync(outputFH, '\n\n----\n\n' +
'The @cyclonedx/yarn-plugin-cyclonedx distributions bundle several libraries that are compatibly licensed.\n' +
'We list these here.\n')
Expand All @@ -141,6 +143,6 @@ for (const tpLicense of tpLicenses) {
writeSync(outputFH, `License: ${tpLicense.licenseDeclared}\n`)
writeSync(outputFH, ` For details see: https://www.npmjs.com/package/${tpLicense.name}/v/${tpLicense.version}?activeTab=code\n`)
for (const licenseFile of tpLicense.licenseFiles) {
writeSync(outputFH, ` - ${licenseFile}\n`)
writeSync(outputFH, ` - File: ${licenseFile}\n`)
}
}

0 comments on commit f0fabd1

Please sign in to comment.