Skip to content

fix(ci): remove stapler from macOS CLI signing (PREQ-7041)#476

Merged
okorach-sonar merged 1 commit into
mainfrom
fix/remove-stapler-raw-binary
Jul 8, 2026
Merged

fix(ci): remove stapler from macOS CLI signing (PREQ-7041)#476
okorach-sonar merged 1 commit into
mainfrom
fix/remove-stapler-raw-binary

Conversation

@tomverin

@tomverin tomverin commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove xcrun stapler staple / validate from the sign-macos job
  • Codesign + notarization are unaffected; only the stapler step was failing

Root cause

xcrun stapler only supports .app, .dmg, and .pkg — not bare Mach-O CLI binaries. After #468 added stapler and #469 switched to branch-based releases on main, every release run failed with:

Stapler is incapable of working with Document files.
exit code 66

Friday's v1.0.0-rc2 succeeded because it was built before stapler landed (tag release, no stapler step). Mate's #473 (Windows SIGNING_PROFILE cleanup) did not break macOS — Windows signing works; macOS fails at stapler.

This matches sonarqube-cli, which notarizes zipped binaries but does not staple raw executables. Gatekeeper verifies notarization online on first launch.

Test plan

  • Merge and confirm sign-macos passes on a main push
  • Confirm publish completes and release assets include signed darwin binaries
  • Optional: codesign --verify + spctl -a -t exec -vv on downloaded darwin binary

xcrun stapler only works on .app/.dmg/.pkg bundles, not bare Mach-O
binaries. Codesign + notarization still succeed; stapler was failing with
"Stapler is incapable of working with Document files" (exit 66).

Aligns with sonarqube-cli which notarizes but does not staple raw binaries.
@tomverin
tomverin requested a review from a team as a code owner July 8, 2026 06:52
@gitar-bot

gitar-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Removes the stapler step from the macOS CLI signing process, resolving the exit code 66 error caused by unsupported Mach-O binary stapling. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@okorach-sonar okorach-sonar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

@okorach-sonar
okorach-sonar merged commit ee611c6 into main Jul 8, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants