This PR introduces an optional build flag, `--native`, that will build a version of the Codex npm module that: - Includes both the Node.js and native Rust versions (for Mac and Linux) - Will run the native version if `CODEX_RUST=1` is set - Runs the TypeScript version otherwise Note this PR also updates the workflow URL to https://github.com/openai/codex/actions/runs/14872557396, as that is a build from today that includes everything up through https://github.com/openai/codex/pull/843. Test Plan: In `~/code/codex/codex-cli`, I ran: ``` pnpm stage-release --native ``` The end of the output was: ``` Staged version 0.1.2505121317 for release in /var/folders/wm/f209bc1n2bd_r0jncn9s6j_00000gp/T/tmp.xd2p5ETYGN Test Node: node /var/folders/wm/f209bc1n2bd_r0jncn9s6j_00000gp/T/tmp.xd2p5ETYGN/bin/codex.js --help Test Rust: CODEX_RUST=1 node /var/folders/wm/f209bc1n2bd_r0jncn9s6j_00000gp/T/tmp.xd2p5ETYGN/bin/codex.js --help Next: cd "/var/folders/wm/f209bc1n2bd_r0jncn9s6j_00000gp/T/tmp.xd2p5ETYGN" && npm publish --tag native ``` I verified that running each of these commands ran the expected version of Codex. While here, I also added `bin` to the `files` list in `package.json`, which should have been done as part of https://github.com/openai/codex/pull/757, as that added new entries to `bin` that were matched by `.gitignore` but should have been included in a release.
3.0 KiB
3.0 KiB