diff options
| author | Dax Raad <[email protected]> | 2025-10-28 20:28:30 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-10-28 20:28:30 -0400 |
| commit | 09e7e0ab70e6d3ff36eed0e77aa99610194e9c59 (patch) | |
| tree | ce08acc80677c1b083b7201cef1d65ad6e63b025 | |
| parent | 0e60f666043910afb96e9de2f84b0b8a68c7e4d6 (diff) | |
| download | opencode-09e7e0ab70e6d3ff36eed0e77aa99610194e9c59.tar.gz opencode-09e7e0ab70e6d3ff36eed0e77aa99610194e9c59.zip | |
tag majors
| -rwxr-xr-x | packages/opencode/script/publish.ts | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/packages/opencode/script/publish.ts b/packages/opencode/script/publish.ts index ef35b8514..a81e7e9e9 100755 --- a/packages/opencode/script/publish.ts +++ b/packages/opencode/script/publish.ts @@ -41,15 +41,32 @@ for (const [name] of Object.entries(binaries)) { await $`cd ./dist/${pkg.name} && bun publish --access public --tag ${Script.channel}` if (!Script.preview) { + const major = Script.version.split(".")[0] + const majorTag = `v${major}` + for (const [name] of Object.entries(binaries)) { + await $`cd dist/${name} && npm dist-tag add ${name}@${Script.version} ${majorTag}` + } + await $`cd ./dist/${pkg.name} && npm dist-tag add ${pkg.name}-ai@${Script.version} ${majorTag}` +} + +if (!Script.preview) { for (const key of Object.keys(binaries)) { await $`cd dist/${key}/bin && zip -r ../../${key}.zip *` } // Calculate SHA values - const arm64Sha = await $`sha256sum ./dist/opencode-linux-arm64.zip | cut -d' ' -f1`.text().then((x) => x.trim()) - const x64Sha = await $`sha256sum ./dist/opencode-linux-x64.zip | cut -d' ' -f1`.text().then((x) => x.trim()) - const macX64Sha = await $`sha256sum ./dist/opencode-darwin-x64.zip | cut -d' ' -f1`.text().then((x) => x.trim()) - const macArm64Sha = await $`sha256sum ./dist/opencode-darwin-arm64.zip | cut -d' ' -f1`.text().then((x) => x.trim()) + const arm64Sha = await $`sha256sum ./dist/opencode-linux-arm64.zip | cut -d' ' -f1` + .text() + .then((x) => x.trim()) + const x64Sha = await $`sha256sum ./dist/opencode-linux-x64.zip | cut -d' ' -f1` + .text() + .then((x) => x.trim()) + const macX64Sha = await $`sha256sum ./dist/opencode-darwin-x64.zip | cut -d' ' -f1` + .text() + .then((x) => x.trim()) + const macArm64Sha = await $`sha256sum ./dist/opencode-darwin-arm64.zip | cut -d' ' -f1` + .text() + .then((x) => x.trim()) const [pkgver, _subver = ""] = Script.version.split(/(-.*)/, 2) |
