Skip to content

Commit 2233441

Browse files
anandgupta42claude
andcommitted
fix: use absolute paths for release archive output
The scoped npm package name (@altimate/cli-*) creates nested directories under dist/, so relative paths from dist/@altimate/cli-*/bin/ couldn't reach dist/. Use absolute paths and map to altimate-code-* archive names that publish.ts and the Homebrew formula expect. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 105d524 commit 2233441

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/altimate-code/script/build.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,13 @@ for (const item of targets) {
220220

221221
if (Script.release) {
222222
for (const key of Object.keys(binaries)) {
223+
// Map npm scope name (@altimate/cli-linux-arm64) to archive name (altimate-code-linux-arm64)
224+
const archiveName = key.replace(/^@altimate\/cli/, "altimate-code")
225+
const archivePath = path.resolve("dist", archiveName)
223226
if (key.includes("linux")) {
224-
await $`tar -czf ../../${key}.tar.gz *`.cwd(`dist/${key}/bin`)
227+
await $`tar -czf ${archivePath}.tar.gz *`.cwd(`dist/${key}/bin`)
225228
} else {
226-
await $`zip -r ../../${key}.zip *`.cwd(`dist/${key}/bin`)
229+
await $`zip -r ${archivePath}.zip *`.cwd(`dist/${key}/bin`)
227230
}
228231
}
229232
await $`gh release upload v${Script.version} ./dist/*.zip ./dist/*.tar.gz --clobber --repo ${process.env.GH_REPO}`

0 commit comments

Comments
 (0)