Skip to content

Commit a692e6f

Browse files
committed
desktop: use correct download link in finalize-latest-json
1 parent d1938a4 commit a692e6f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/desktop/scripts/finalize-latest-json.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ if (!repo) throw new Error("GH_REPO is required")
2020
const releaseId = process.env.OPENCODE_RELEASE
2121
if (!releaseId) throw new Error("OPENCODE_RELEASE is required")
2222

23+
const version = process.env.OPENCODE_VERSION
24+
if (!releaseId) throw new Error("OPENCODE_VERSION is required")
25+
2326
const token = process.env.GH_TOKEN ?? process.env.GITHUB_TOKEN
2427
if (!token) throw new Error("GH_TOKEN or GITHUB_TOKEN is required")
2528

@@ -39,7 +42,6 @@ if (!releaseRes.ok) {
3942
type Asset = {
4043
name: string
4144
url: string
42-
browser_download_url: string
4345
}
4446

4547
type Release = {
@@ -89,7 +91,7 @@ const entries: Record<string, { url: string; signature: string }> = {}
8991
const add = (key: string, asset: Asset, signature: string) => {
9092
if (entries[key]) return
9193
entries[key] = {
92-
url: asset.browser_download_url,
94+
url: `https://github.com/${repo}/releases/download/${version}/${asset.name}`,
9395
signature,
9496
}
9597
}

0 commit comments

Comments
 (0)