From 564ef930662f55ec2399ed3f44913acc839f3474 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Sun, 3 Aug 2025 12:37:59 -0400 Subject: [PATCH] ci: ignore --- script/publish.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/script/publish.ts b/script/publish.ts index 33813a984f..2e74eb054a 100755 --- a/script/publish.ts +++ b/script/publish.ts @@ -15,14 +15,13 @@ const pkgjsons = await Array.fromAsync( new Bun.Glob("**/package.json").scan({ absolute: true, }), -) +).then((arr) => arr.filter((x) => !x.includes("node_modules") && !x.includes("dist"))) const tree = await $`git add . && git write-tree`.text().then((x) => x.trim()) -for await (const file of new Bun.Glob("**/package.json").scan({ - absolute: true, -})) { +for (const file of pkgjsons) { let pkg = await Bun.file(file).text() pkg = pkg.replaceAll(/"version": "[^"]+"/g, `"version": "${version}"`) + console.log("versioned", file, version) await Bun.file(file).write(pkg) } @@ -43,9 +42,7 @@ if (snapshot) { await $`git push origin v${version} --no-verify` await $`git checkout dev` await $`git branch -D snapshot-${version}` - for await (const file of new Bun.Glob("**/package.json").scan({ - absolute: true, - })) { - $`await git checkout ${tree} ${file}` + for (const file of pkgjsons) { + await $`git checkout ${tree} ${file}` } }