ci: ignore

This commit is contained in:
Dax Raad
2025-08-03 12:52:23 -04:00
parent 263b266476
commit 564ef93066
+5 -8
View File
@@ -15,14 +15,13 @@ const pkgjsons = await Array.fromAsync(
new Bun.Glob("**/package.json").scan({ new Bun.Glob("**/package.json").scan({
absolute: true, 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()) const tree = await $`git add . && git write-tree`.text().then((x) => x.trim())
for await (const file of new Bun.Glob("**/package.json").scan({ for (const file of pkgjsons) {
absolute: true,
})) {
let pkg = await Bun.file(file).text() let pkg = await Bun.file(file).text()
pkg = pkg.replaceAll(/"version": "[^"]+"/g, `"version": "${version}"`) pkg = pkg.replaceAll(/"version": "[^"]+"/g, `"version": "${version}"`)
console.log("versioned", file, version)
await Bun.file(file).write(pkg) await Bun.file(file).write(pkg)
} }
@@ -43,9 +42,7 @@ if (snapshot) {
await $`git push origin v${version} --no-verify` await $`git push origin v${version} --no-verify`
await $`git checkout dev` await $`git checkout dev`
await $`git branch -D snapshot-${version}` await $`git branch -D snapshot-${version}`
for await (const file of new Bun.Glob("**/package.json").scan({ for (const file of pkgjsons) {
absolute: true, await $`git checkout ${tree} ${file}`
})) {
$`await git checkout ${tree} ${file}`
} }
} }