Conversation
- Portable builds are multi arch, supporting linux-x64 and linux-aarch64 - `build-portable.ts` is replacing the existing musl binaries with their static variants - Files in dist/ retain their name "opencode-linux-*-musl" - `install` script updated to parse the system's glibc version in order to select the static musl variant even on non-alpine distros - build using: `bun run build && bun run build:portable` - build requires `docker` to be installed
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa0cb0438a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!Bun.file(`dist/${item.artifact}/bin/opencode`).exists()) { | ||
| console.error(`Artifact dist/${item.artifact}/bin/opencode does not exist. Please build it first.`) | ||
| process.exit(1) |
There was a problem hiding this comment.
Await Bun.file().exists() before checking artifacts
Bun.file(...).exists() is async (see other usages in this repo that all await it), so the current if (!Bun.file(...).exists()) always evaluates to false because the Promise is truthy. That means missing artifacts won’t be detected and the script will proceed to run file/docker build, failing later with less actionable errors. Use await Bun.file(...).exists() so the early exit actually works when the artifact is absent.
Useful? React with 👍 / 👎.
build-portable.tsis replacing the existing musl binaries with their static variantsinstallscript updated to parse the system's glibc version in order to select the static musl variant even on non-alpine distrosbun run build && bun run build:portabledockerto be installedWhat does this PR do?
How did you verify your code works?