Bundle Wllama license from its pinned release
Build and publish static assets / publish (push) Successful in 8m29s
Build and publish static assets / publish (push) Successful in 8m29s
This commit is contained in:
@@ -70,15 +70,7 @@ await unlink(tgzPath);
|
||||
for (const relative of ['esm/index.js', 'esm/wasm/wllama.wasm']) {
|
||||
if (!(await stat(join(wllamaRoot, relative))).isFile()) throw new Error(`Missing Wllama runtime asset: ${relative}`);
|
||||
}
|
||||
const wllamaLicenseCandidates = ['LICENSE', 'LICENSE.md', 'LICENSE.txt'];
|
||||
let wllamaLicense;
|
||||
for (const candidate of wllamaLicenseCandidates) {
|
||||
const candidatePath = join(wllamaRoot, candidate);
|
||||
if ((await stat(candidatePath).catch(() => null))?.isFile()) { wllamaLicense = candidatePath; break; }
|
||||
}
|
||||
if (!wllamaLicense) throw new Error('Wllama package is missing its license file');
|
||||
await cp(wllamaLicense, join(licenseRoot, 'WLLAMA_LICENSE.txt'));
|
||||
for (const file of ['GEMMA_USER_TERMS.html', 'GEMMA_TERMS.html', 'GEMMA_PROHIBITED_USE_POLICY.html', 'GEMMA_NOTICE.txt', 'GEMMA_SOURCE.txt', 'LLAMA_CPP_LICENSE.txt']) {
|
||||
for (const file of ['GEMMA_USER_TERMS.html', 'GEMMA_TERMS.html', 'GEMMA_PROHIBITED_USE_POLICY.html', 'GEMMA_NOTICE.txt', 'GEMMA_SOURCE.txt', 'WLLAMA_LICENSE.txt', 'LLAMA_CPP_LICENSE.txt']) {
|
||||
const source = join(root, 'licenses', file);
|
||||
if (!(await stat(source).catch(() => null))?.isFile()) throw new Error(`Missing Gemma legal asset: ${file}`);
|
||||
await cp(source, join(licenseRoot, file));
|
||||
|
||||
Reference in New Issue
Block a user