Dax Raad vor 2 Monaten
Ursprung
Commit
e3d22489aa
1 geänderte Dateien mit 7 neuen und 15 gelöschten Zeilen
  1. 7 15
      packages/opencode/script/publish.ts

+ 7 - 15
packages/opencode/script/publish.ts

@@ -37,29 +37,21 @@ await Bun.file(`./dist/${pkg.name}/package.json`).write(
   ),
 )
 
-const tags = [Script.channel]
-
 const tasks = Object.entries(binaries).map(async ([name]) => {
   if (process.platform !== "win32") {
     await $`chmod -R 755 .`.cwd(`./dist/${name}`)
   }
   await $`bun pm pack`.cwd(`./dist/${name}`)
-  for (const tag of tags) {
-    await $`npm publish *.tgz --access public --tag ${tag}`.cwd(`./dist/${name}`)
-  }
+  await $`npm publish *.tgz --access public --tag ${Script.channel}`.cwd(`./dist/${name}`)
 })
 await Promise.all(tasks)
-for (const tag of tags) {
-  await $`cd ./dist/${pkg.name} && bun pm pack && npm publish *.tgz --access public --tag ${tag}`
-}
+await $`cd ./dist/${pkg.name} && bun pm pack && npm publish *.tgz --access public --tag ${Script.channel}`
 
-if (!Script.preview) {
-  const image = "ghcr.io/anomalyco/opencode"
-  const platforms = "linux/amd64,linux/arm64"
-  const tags = [`${image}:${version}`, `${image}:latest`]
-  const tagFlags = tags.flatMap((t) => ["-t", t])
-  await $`docker buildx build --platform ${platforms} ${tagFlags} --push .`
-}
+const image = "ghcr.io/anomalyco/opencode"
+const platforms = "linux/amd64,linux/arm64"
+const tags = [`${image}:${version}`, `${image}:${Script.channel}`]
+const tagFlags = tags.flatMap((t) => ["-t", t])
+await $`docker buildx build --platform ${platforms} ${tagFlags} --push .`
 
 // registries
 if (!Script.preview) {