From 513747d034efa2f05291ba96760e91fa53db7729 Mon Sep 17 00:00:00 2001 From: Ales Erjavec Date: Mon, 13 Nov 2023 15:35:55 +0100 Subject: [PATCH] build-macos-installer.yml: Patch create-dmg --- .github/workflows/build-macos-installer.yml | 29 ++++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-macos-installer.yml b/.github/workflows/build-macos-installer.yml index 8b0aa06..04c0147 100644 --- a/.github/workflows/build-macos-installer.yml +++ b/.github/workflows/build-macos-installer.yml @@ -59,11 +59,32 @@ jobs: - name: 'Install modified create-dmg (modified to allow longer detach timeouts)' shell: bash run: | - wget https://github.com/create-dmg/create-dmg/archive/refs/tags/v1.0.10.tar.gz - tar -zxvf v1.0.10.tar.gz + wget https://github.com/create-dmg/create-dmg/archive/refs/tags/v1.2.1.tar.gz + tar -zxvf v1.2.1.tar.gz cd create-dmg-1.0.10/ - sed -i.bu 's/MAXIMUM_UNMOUNTING_ATTEMPTS=3/MAXIMUM_UNMOUNTING_ATTEMPTS=6/g' create-dmg - cat create-dmg | grep MAXIMUM_UNMOUNTING_ATTEMPTS + patch create-dmg <<'EOF' + --- a/create-dmg 2023-11-13 15:11:49.411364880 +0100 + +++ b/create-dmg 2023-11-13 15:20:02.373043672 +0100 + @@ -31,7 +31,7 @@ + SANDBOX_SAFE=0 + BLESS=0 + SKIP_JENKINS=0 + -MAXIMUM_UNMOUNTING_ATTEMPTS=3 + +MAXIMUM_UNMOUNTING_ATTEMPTS=6 + SIGNATURE="" + NOTARIZE="" + + @@ -41,6 +41,8 @@ + + function hdiutil_detach_retry() { + # Unmount + + sync --file-system "$1" + + sleep 10 + unmounting_attempts=0 + until + echo "Unmounting disk image..." + + EOF make install cd ..