mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
ci
This commit is contained in:
parent
a3fbbece9a
commit
c1ee6d6c41
4 changed files with 4 additions and 7 deletions
|
|
@ -37,10 +37,6 @@ await Bun.file(`./dist/${pkg.name}/package.json`).write(
|
|||
)
|
||||
|
||||
const tags = [Script.channel]
|
||||
if (!Script.preview) {
|
||||
const major = Script.version.split(".")[0]
|
||||
tags[0] = `latest-${major}`
|
||||
}
|
||||
|
||||
const tasks = Object.entries(binaries).map(async ([name]) => {
|
||||
if (process.platform !== "win32") {
|
||||
|
|
|
|||
|
|
@ -184,7 +184,8 @@ export namespace Installation {
|
|||
return reg.endsWith("/") ? reg.slice(0, -1) : reg
|
||||
})
|
||||
const [major] = VERSION.split(".").map((x) => Number(x))
|
||||
const channel = CHANNEL === "latest" ? `latest-${major}` : CHANNEL
|
||||
// const channel = CHANNEL === "latest" ? `latest-${major}` : CHANNEL
|
||||
const channel = CHANNEL
|
||||
return fetch(`${registry}/opencode-ai/${channel}`)
|
||||
.then((res) => {
|
||||
if (!res.ok) throw new Error(res.statusText)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const IS_PREVIEW = CHANNEL !== "latest"
|
|||
const VERSION = await (async () => {
|
||||
if (env.OPENCODE_VERSION) return env.OPENCODE_VERSION
|
||||
if (IS_PREVIEW) return `0.0.0-${CHANNEL}-${new Date().toISOString().slice(0, 16).replace(/[-:T]/g, "")}`
|
||||
const version = await fetch("https://registry.npmjs.org/opencode-ai/latest-1")
|
||||
const version = await fetch("https://registry.npmjs.org/opencode-ai/latest")
|
||||
.then((res) => {
|
||||
if (!res.ok) throw new Error(res.statusText)
|
||||
return res.json()
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const notes = [] as string[]
|
|||
console.log("=== publishing ===\n")
|
||||
|
||||
if (!Script.preview) {
|
||||
const previous = await fetch("https://registry.npmjs.org/opencode-ai/latest-1")
|
||||
const previous = await fetch("https://registry.npmjs.org/opencode-ai/latest")
|
||||
.then((res) => {
|
||||
if (!res.ok) throw new Error(res.statusText)
|
||||
return res.json()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue