-
Notifications
You must be signed in to change notification settings - Fork 1.3k
clean between darwin archs #28866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clean between darwin archs #28866
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,6 +19,10 @@ else | |||||||||
| # Build both architectures | ||||||||||
| "$client_dir/packaging/slack/send.sh" "Starting darwin build" | ||||||||||
| ARCH="amd64" PLATFORM="darwin" "$client_dir/packaging/prerelease/pull_build.sh" | ||||||||||
|
|
||||||||||
| # Clean repo between arch builds | ||||||||||
| cd "$client_dir" && git reset --hard && git clean -fd | ||||||||||
|
||||||||||
| cd "$client_dir" && git reset --hard && git clean -fd | |
| cd "$client_dir" | |
| git reset --hard | |
| git clean -fd |
Copilot
AI
Feb 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the git reset and clean, the second architecture build will call check_status_and_pull.sh which performs a 'git pull --ff-only'. This means if new commits are pushed to the remote between the amd64 and arm64 builds, the two architectures will be built from different commits.
Consider setting NOPULL=1 for the second build to ensure both architectures are built from the same commit:
ARCH="arm64" PLATFORM="darwin-arm64" NOPULL=1 "$client_dir/packaging/prerelease/pull_build.sh"
This would make the builds more deterministic and ensure version consistency across architectures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'git clean -fd' command will forcefully delete all untracked files and directories. While this is likely the intended behavior to ensure a clean state between architecture builds, it could potentially delete important untracked files if the script is run in an unexpected context.
Consider adding a comment explaining why these destructive operations are safe in this context (e.g., "Safe to force clean since check_status_and_pull.sh verifies repo is clean before first build, and we only need to remove build artifacts"). This helps prevent future maintainers from accidentally misusing this pattern in contexts where it might not be safe.