WIP: Adding license compliance to CI

This commit is contained in:
Mikayla Maki 2023-01-11 17:52:18 -08:00
parent 4d05d61ed7
commit 4609be20de
3 changed files with 31 additions and 0 deletions

1
licenses/test.tx Normal file
View File

@ -0,0 +1 @@
DATA DATA DATA

1
licenses/test.txt Normal file
View File

@ -0,0 +1 @@
Test test

29
script/collect-licenses.js Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env node
const fs = require('fs');
const file_name = (path) => "./licenses/".concat(path);
const writeFile = (path, data) => {
fs.writeFile(file_name(path), data, (err) => {
if (err) throw err;
console.log("Saved file")
});
}
main();
async function main() {
console.log("Here!");
writeFile("test.tx", "DATA DATA DATA")
// Next steps:
// 1a. Add wiring in Zed to check for a licenses markdown file
// 1b. Add wiring in Zed.dev for builds to publish licenses alongside releases as well as licenses for Zed.dev itself
// 2. Figure out how to run those commands and get the license text for each MIT and Apache licensed software
// 3. Add in the configuration file:
// a. and refactor this script to have types of licenses
// b. add callback handlers for each type,
// c. check if the handler succeeds
}