Skip to content

Commit 512adad

Browse files
committed
fix: normalize Windows release paths and npm invocation
1 parent 1bf3ac4 commit 512adad

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎docs/RELEASING.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Create a coordinated release from a clean branch with one command:
66
npm run release -- 0.7.0
77
```
88

9-
The command keeps the agent package's `@openai/codex` dependency on npm's `latest` tag, so each new user installation resolves the current stable Codex release. It updates the umbrella, agent, browser client, and SDK package versions as one coordinated release group. It preserves the TUI package version and the umbrella package's existing exact TUI dependency. It also updates the release group's exact internal dependencies, runtime version constants, generated client and SDK version API baselines, and `package-lock.json`; runs the SDK release checks; creates a `chore(release): v0.7.0` commit and annotated `v0.7.0` tag; then atomically pushes the current branch and tag to its configured remote.
9+
The Codex provider uses the user's installed Codex CLI. The command updates the umbrella, agent, browser client, and SDK package versions as one coordinated release group. It preserves the TUI package version and the umbrella package's existing exact TUI dependency. It also updates the release group's exact internal dependencies, runtime version constants, generated client and SDK version API baselines, and `package-lock.json`; runs the SDK release checks; creates a `chore(release): v0.7.0` commit and annotated `v0.7.0` tag; then atomically pushes the current branch and tag to its configured remote.
1010

1111
Only `crewcoder-client/api/version.d.ts` and `crewcoder-sdk/api/version.d.ts` may change during the automatic API baseline refresh. Any other public declaration change stops the release for explicit review.
1212

@@ -31,3 +31,5 @@ npm run release -- 0.7.0 --dry-run
3131
```
3232

3333
Pushing the tag does not publish npm packages by itself. Publishing remains controlled by the protected `CrewCoder SDK release` GitHub Actions workflow.
34+
35+
Windows release automation normalizes Git's repository path and invokes npm through its JavaScript entry to preserve argument boundaries. Full release readiness can run on the workflow's Ubuntu runner when local tests require Unix facilities.

‎scripts/release.cjs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ function fail(message) {
2828
}
2929

3030
function run(command, args, options = {}) {
31-
const result = spawnSync(command, args, {
31+
// Windows cannot execute npm batch launchers directly; retain argument boundaries.
32+
const executable = command === "npm" ? process.execPath : command;
33+
const commandArgs = command === "npm" ? [process.env.npm_execpath, ...args] : args;
34+
const result = spawnSync(executable, commandArgs, {
3235
cwd: root,
3336
encoding: options.capture ? "utf8" : undefined,
3437
stdio: options.capture ? ["ignore", "pipe", "pipe"] : "inherit"
@@ -105,7 +108,8 @@ function main(args) {
105108

106109
const version = positional[0];
107110
stableVersionParts(version);
108-
if (run("git", ["rev-parse", "--show-toplevel"], { capture: true }) !== root) {
111+
// Git reports forward slashes on Windows while path.resolve uses native separators.
112+
if (path.resolve(run("git", ["rev-parse", "--show-toplevel"], { capture: true })) !== root) {
109113
fail(`Release script must run from the CrewCoder repository at ${root}.`);
110114
}
111115
if (run("git", ["status", "--porcelain", "--untracked-files=all"], { capture: true })) {

0 commit comments

Comments
 (0)