Bundle Wllama license from its pinned release
Build and publish static assets / publish (push) Successful in 8m29s

This commit is contained in:
Ein Anderssono
2026-10-19 12:04:48 +02:00
parent 9a71195d62
commit e0eda22e21
3 changed files with 23 additions and 9 deletions
+1 -9
View File
@@ -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));