Skip to content

Commit babc145

Browse files
committed
fix: rename githubRelease → tag in release-assets.json for consistency with socket-cli
1 parent f5245a7 commit babc145

3 files changed

Lines changed: 23 additions & 23 deletions

File tree

packages/build-infra/lib/release-checksums.mjs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ let embeddedChecksums
4242
* Load embedded checksums from release-checksums.json.
4343
* Returns cached result on subsequent calls.
4444
*
45-
* @returns {Record<string, {description: string, githubRelease: string, checksums: Record<string, string>}>}
45+
* @returns {Record<string, {description: string, tag: string, checksums: Record<string, string>}>}
4646
*/
4747
function getEmbeddedChecksums() {
4848
if (embeddedChecksums === undefined) {
@@ -77,7 +77,7 @@ function getEmbeddedChecksum(tool, assetName) {
7777
if (!checksum) {
7878
return undefined
7979
}
80-
return { checksum, tag: toolConfig.githubRelease }
80+
return { checksum, tag: toolConfig.tag }
8181
}
8282

8383
/**
@@ -150,16 +150,16 @@ export async function getSocketBtmReleaseChecksums(options) {
150150
const toolEmbedded = embedded?.[tool]
151151
if (toolEmbedded?.checksums && Object.keys(toolEmbedded.checksums).length > 0) {
152152
// If no specific tag requested, or tag matches embedded, use embedded.
153-
if (preferEmbedded && (!releaseTag || releaseTag === toolEmbedded.githubRelease)) {
153+
if (preferEmbedded && (!releaseTag || releaseTag === toolEmbedded.tag)) {
154154
const result = {
155155
checksums: toolEmbedded.checksums,
156156
source: 'embedded',
157-
tag: toolEmbedded.githubRelease,
157+
tag: toolEmbedded.tag,
158158
}
159159
checksumCache.set(cacheKey, result)
160-
checksumCache.set(`${tool}:${toolEmbedded.githubRelease}`, result)
160+
checksumCache.set(`${tool}:${toolEmbedded.tag}`, result)
161161
if (!quiet) {
162-
logger.info(`Using embedded checksums for ${tool} (${toolEmbedded.githubRelease})`)
162+
logger.info(`Using embedded checksums for ${tool} (${toolEmbedded.tag})`)
163163
}
164164
return result
165165
}
@@ -169,7 +169,7 @@ export async function getSocketBtmReleaseChecksums(options) {
169169
// Resolve release tag if not provided.
170170
const tag =
171171
releaseTag ??
172-
toolEmbedded?.githubRelease ??
172+
toolEmbedded?.tag ??
173173
(await getLatestRelease(toolPrefix, SOCKET_BTM_REPO, { quiet: true }))
174174
if (!tag) {
175175
if (!quiet) {
@@ -251,7 +251,7 @@ export async function getSocketBtmReleaseChecksums(options) {
251251
const result = {
252252
checksums: toolEmbedded.checksums,
253253
source: 'embedded',
254-
tag: toolEmbedded.githubRelease,
254+
tag: toolEmbedded.tag,
255255
}
256256
checksumCache.set(cacheKey, result)
257257
return result

packages/build-infra/release-assets.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"$comment": "SHA-256 checksums for GitHub release assets. Run 'pnpm --filter build-infra update-checksums' to update.",
44
"lief": {
55
"description": "LIEF binary manipulation library",
6-
"githubRelease": "lief-20260327-24aa623",
6+
"tag": "lief-20260327-24aa623",
77
"checksums": {
88
"lief-darwin-arm64.tar.gz": "d91a66d2990ab5c069fce70c8b652aedacd2f0426068980f8caa7626d157c2e1",
99
"lief-darwin-x64.tar.gz": "0013fa445e68186f977ec6508670bba72601f8a184dd5ec59124436c128a40b3",
@@ -17,7 +17,7 @@
1717
},
1818
"curl": {
1919
"description": "curl with mbedTLS for HTTPS support",
20-
"githubRelease": "curl-20260408-c9f18be",
20+
"tag": "curl-20260408-c9f18be",
2121
"checksums": {
2222
"curl-darwin-arm64.tar.gz": "34199b4a96faef8c988a4fbe46d474b464d4684952351f15312764b24b25ae45",
2323
"curl-darwin-x64.tar.gz": "36fa05374713cafff8a70a2ade5257a87d9c4ba7fd1ad77b2762c4aa18da2e34",
@@ -31,7 +31,7 @@
3131
},
3232
"stubs": {
3333
"description": "Self-extracting stub binaries",
34-
"githubRelease": "stubs-20260410-2780bf7",
34+
"tag": "stubs-20260410-2780bf7",
3535
"checksums": {
3636
"smol-stub-darwin-arm64.tar.gz": "b19161a02116677c8ac13f1370ba6f3fffdba58bd64fe7852383a9ac11d04a45",
3737
"smol-stub-darwin-x64.tar.gz": "2e7ba64a28865fcfa780526bc2c92d48ad19af1028b10a7029b6ae47dddc4704",
@@ -45,7 +45,7 @@
4545
},
4646
"binpress": {
4747
"description": "Binary compression tool using LZFSE",
48-
"githubRelease": "binpress-20260409-dc7f9e3",
48+
"tag": "binpress-20260409-dc7f9e3",
4949
"checksums": {
5050
"binpress-darwin-arm64": "15e4a27295b9fa0a43df8f0d3fe23e95c34e913f5ec03103afe2d3452aba3ba5",
5151
"binpress-darwin-x64": "e5168c1af3df99e13d8a3327432a7e926494426dbe54f57170145eeda04542ff",
@@ -59,7 +59,7 @@
5959
},
6060
"binflate": {
6161
"description": "Binary decompression tool",
62-
"githubRelease": "binflate-20260409-dc7f9e3",
62+
"tag": "binflate-20260409-dc7f9e3",
6363
"checksums": {
6464
"binflate-darwin-arm64": "e286a4205884e4ae5dbac6096dbb874d523a25474f2d35049248999f721660e5",
6565
"binflate-darwin-x64": "af52bb4e39504aa11ef7e72edf8a2af93c01421b4447fa2be0e8cc61f0928ac9",
@@ -73,7 +73,7 @@
7373
},
7474
"binject": {
7575
"description": "Binary injection tool for SEA resources",
76-
"githubRelease": "binject-20260409-dc7f9e3",
76+
"tag": "binject-20260409-dc7f9e3",
7777
"checksums": {
7878
"binject-darwin-arm64": "80c0d2a66a37bf398b3bf78b84519b9a129c8f911b6447c1f5834763624657d7",
7979
"binject-darwin-x64": "fbeb7cf58685c1de52b695d3cfdfe0242c5fb3e0315bfb16b6c6093c3cdb07b8",
@@ -87,7 +87,7 @@
8787
},
8888
"node-smol": {
8989
"description": "Custom Node.js binary with Socket patches",
90-
"githubRelease": "node-smol-20260409-dc7f9e3",
90+
"tag": "node-smol-20260409-dc7f9e3",
9191
"checksums": {
9292
"node-darwin-arm64": "3fbed6439b91e8ac7d0a822937a7e36cbbb22ee129693130429916f7e3e88681",
9393
"node-darwin-x64": "223b7ad99ff60ae78315d6452cb8fc843fcbd432ae431719c38cdfb2d9ce160a",
@@ -101,14 +101,14 @@
101101
},
102102
"ink": {
103103
"description": "Prepatched ink TUI framework",
104-
"githubRelease": "ink-20260327-24aa623",
104+
"tag": "ink-20260327-24aa623",
105105
"checksums": {
106106
"ink-20260327-24aa623.tgz": "724a060cb21d931cb8566bf1ba88b18a3ad124304fdb849e40d75ecedb2c74ac"
107107
}
108108
},
109109
"iocraft": {
110110
"description": "iocraft native Node.js bindings",
111-
"githubRelease": "iocraft-20260327-e2979e3",
111+
"tag": "iocraft-20260327-e2979e3",
112112
"checksums": {
113113
"iocraft-20260327-e2979e3-darwin-arm64.node": "bea133c69669e4f7a62bc59f3673062784a05e2036b28d925b694614960586fa",
114114
"iocraft-20260327-e2979e3-darwin-x64.node": "e75cd24c41f509a2252f293183ad7be385a9a141f24669e26aaab031dabf3153",
@@ -122,7 +122,7 @@
122122
},
123123
"onnxruntime": {
124124
"description": "ONNX Runtime WASM build",
125-
"githubRelease": "onnxruntime-20260327-82a7c4b",
125+
"tag": "onnxruntime-20260327-82a7c4b",
126126
"checksums": {
127127
"ort.wasm": "3f0a97b0c6d653ec27bfba79708c4d1f545117049a08494e82fa7522ee411a6b",
128128
"ort-sync.mjs": "3c456072a2d80461c3dfbfdf8b99ac2f4ee7e09bf092bcd6c4dcab53d5a7c575",
@@ -132,15 +132,15 @@
132132
},
133133
"models": {
134134
"description": "Quantized ONNX ML models",
135-
"githubRelease": "models-20260327-82a7c4b",
135+
"tag": "models-20260327-82a7c4b",
136136
"checksums": {
137137
"./codet5/model.onnx": "6ffdb38778b977f484a19534b164a274108d7d8df532b54df0496474b4b92305",
138138
"./minilm-l6/model.onnx": "1e1a94af7030879af0896adc8d23e86eee9b81c790e5537ff62292974787825e"
139139
}
140140
},
141141
"yoga-layout": {
142142
"description": "Yoga Layout WASM build",
143-
"githubRelease": "yoga-layout-20260327-82a7c4b",
143+
"tag": "yoga-layout-20260327-82a7c4b",
144144
"checksums": {
145145
"yoga-20260327-82a7c4b.wasm": "cd09b00ace86b149808d4e076f2100d5eb44aac8035dd366b4f41f5060b67ab4",
146146
"yoga-20260327-82a7c4b.mjs": "8ddb2edf3f797217cb7e27c452ec01ea4f78f0146b3b1c10380e8006322c4587",
@@ -150,7 +150,7 @@
150150
},
151151
"opentui": {
152152
"description": "OpenTUI native Node.js bindings",
153-
"githubRelease": "opentui-20260412-60a262e",
153+
"tag": "opentui-20260412-60a262e",
154154
"checksums": {
155155
"opentui-20260412-60a262e-darwin-arm64.node": "a4accf7c741ef0324a3a9e26ffade56587a790ff407443dfc0c94a2e3da027bf",
156156
"opentui-20260412-60a262e-darwin-x64.node": "cc229af8f29e09d7ff8ef3f2285a34210482ac6c5a5c317e13a63777fed1f273",

packages/build-infra/scripts/update-checksums.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ async function main() {
149149

150150
// Check if update is needed.
151151
const current = currentData[tool]
152-
const currentTag = current?.githubRelease
152+
const currentTag = current?.tag
153153
const currentChecksums = current?.checksums || {}
154154
const currentCount = Object.keys(currentChecksums).length
155155

@@ -167,7 +167,7 @@ async function main() {
167167
currentData[tool] = { __proto__: null }
168168
}
169169
currentData[tool].description = current?.description || `${tool} binaries`
170-
currentData[tool].githubRelease = tag
170+
currentData[tool].tag = tag
171171
currentData[tool].checksums = checksums
172172

173173
if (tagChanged) {

0 commit comments

Comments
 (0)