Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,14 @@ XPC_DIR="$FRAMEWORKS_DIR/Sparkle.framework/Versions/Current/XPCServices"
for xpc in Installer.xpc Downloader.xpc; do
XPC_PATH="$XPC_DIR/$xpc"
if [[ -d "$XPC_PATH" ]]; then
# File Provider may reattach FinderInfo to package directories after a
# recursive xattr pass, so clear every entry immediately before signing.
find "$XPC_PATH" -exec xattr -cs {} \;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clear package directories after their descendants

When the build directory is in a File Provider-backed folder—the scenario this cleanup targets—find visits each directory before walking its children by default, so FinderInfo can be reattached while those descendants are accessed and remain present when codesign runs. The macOS find manual documents -d as depth-first traversal (equivalent to -depth); use it for both cleanup passes so each package directory is cleared only after its contents have been visited. macOS find(1)

Useful? React with 👍 / 👎.

codesign --force --sign - --timestamp=none \
--preserve-metadata=identifier,entitlements,flags "$XPC_PATH"
fi
done
find "$FRAMEWORKS_DIR/Sparkle.framework" -exec xattr -cs {} \;
codesign --force --sign - --timestamp=none "$FRAMEWORKS_DIR/Sparkle.framework"

echo "✓ built $APP_DIR ($VERSION)"