chore(release): add local macOS arm64 release flow#4
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4723b0b22
ℹ️ 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 source is not None: | ||
| if source != notes_file: | ||
| notes_file.parent.mkdir(parents=True, exist_ok=True) | ||
| shutil.copy2(source, notes_file) |
There was a problem hiding this comment.
Normalize the notes path before comparing
When --notes-file is passed as a relative path, release_paths() stores the destination as an absolute notes_file.resolve(), but this block compares it with the original relative source. For a common invocation like --notes-file release-notes.md, the paths refer to the same file but compare unequal, so shutil.copy2(source, notes_file) attempts to copy the file onto itself and raises SameFileError late in the release after the build/signing work has already completed.
Useful? React with 👍 / 👎.
| validate_host(dry_run=args.dry_run) | ||
| validate_required_tools(REQUIRED_TOOLS) |
There was a problem hiding this comment.
Keep dry-run from requiring macOS signing tools
In a dry run on Linux/non-arm64, validate_host() explicitly allows the run to continue, but the next unconditional tool check still requires macOS-only tools such as codesign, security, ditto, and xcrun. That makes --dry-run fail before it can print the planned commands on the non-Mac hosts that the preceding branch permits, so the validation path is effectively unusable outside macOS unless those unavailable tools somehow exist.
Useful? React with 👍 / 👎.
Summary
.codex-release/as an ignored local home for signing material and release configVerification
python3 -m unittest scripts/test_release_macos_arm64.pypython3 -m py_compile scripts/release_macos_arm64.py scripts/test_release_macos_arm64.pypython3 scripts/release_macos_arm64.py --version 0.0.0-o3.0 --dry-runjust fmtjust test -p codex-cli