fix: script

This commit is contained in:
Gab 2026-03-26 15:14:37 +11:00
parent 12ae1cb9b5
commit 3581538902

View File

@ -14,6 +14,7 @@ const TFCODE_VERSION = pkg.version
const GITEA_HOST = process.env.GITEA_HOST || "gitea.toothfairyai.com"
const GITEA_TOKEN = process.env.GITEA_TOKEN
const GITEA_REPO = process.env.GITEA_REPO || "ToothFairyAI/tf_code"
const NPM_TAG = process.env.NPM_TAG || "latest"
// Collect binaries
const binaries: Record<string, string> = {}
@ -176,11 +177,11 @@ child.on('exit', (code) => process.exit(code || 0))
for (const [name, version] of Object.entries(binaries)) {
console.log(`Publishing ${name}...`)
await $`cd ./dist/${name.replace("@toothfairyai/", "")} && bun pm pack && npm publish *.tgz --access public --tag beta`
await $`cd ./dist/${name.replace("@toothfairyai/", "")} && bun pm pack && npm publish *.tgz --access public --tag ${NPM_TAG}`
}
console.log("Publishing main package...")
await $`cd ./dist/tfcode && bun pm pack && npm publish *.tgz --access public --tag beta`
await $`cd ./dist/tfcode && bun pm pack && npm publish *.tgz --access public --tag ${NPM_TAG}`
}
// Create Homebrew formula