mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 18:35:05 +00:00
Make Strip Sparkle build phase resilient to rm -rf races
The post-embed strip script was intermittently failing with "Directory not empty" when rm -rf raced against codesign/Spotlight/Xcode touching the freshly-embedded framework. Atomically rename the framework out of the embed path first, then rm -rf with a short retry loop, so a clean build is no longer needed to recover.
This commit is contained in:
@@ -384,7 +384,7 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "if [ \"${CONFIGURATION}\" != \"Release-DeveloperID\" ]; then\n FW=\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Sparkle.framework\"\n if [ -d \"$FW\" ]; then\n echo \"Stripping Sparkle.framework (config=${CONFIGURATION})\"\n rm -rf \"$FW\"\n fi\nfi\n";
|
shellScript = "if [ \"${CONFIGURATION}\" != \"Release-DeveloperID\" ]; then\n FW=\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Sparkle.framework\"\n if [ -d \"$FW\" ]; then\n echo \"Stripping Sparkle.framework (config=${CONFIGURATION})\"\n chflags -R nouchg \"$FW\" 2>/dev/null || true\n chmod -R u+w \"$FW\" 2>/dev/null || true\n TMP=\"${FW}.stripping.$$\"\n if mv \"$FW\" \"$TMP\" 2>/dev/null; then\n TARGET=\"$TMP\"\n else\n TARGET=\"$FW\"\n fi\n for i in 1 2 3 4 5; do\n rm -rf \"$TARGET\" && break\n sleep 0.2\n done\n if [ -e \"$TARGET\" ]; then\n echo \"warning: failed to fully remove $TARGET\" >&2\n exit 1\n fi\n fi\nfi\n";
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user