Skip to content

Commit

Permalink
darwin_app: hdiutil create now also causes issues on GH CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
agraef committed Dec 13, 2024
1 parent 52fae40 commit 2dd8f7d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/darwin_app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ dmg:
rm -f build.dmg
hdiutil create -format UDRW -fs HFS+ -srcfolder "$(BUILD_BASE)" \
-volname $(VOLUME_NAME) build.dmg
# GH runner often fails here, do max 10 retries
nretries=10; until [[ $$nretries -le 0 ]] || hdiutil create -format UDRW -fs HFS+ -srcfolder "$(BUILD_BASE)" -volname $(VOLUME_NAME) build.dmg; do echo "hdiutil create failed, retrying"; sleep 5; nretries=$$(expr $$nretries - 1); done
# detach one with the same name first
-hdiutil detach "/Volumes/$(VOLUME_NAME)"
hdiutil attach build.dmg
Expand All @@ -216,8 +218,8 @@ dmg:
$(MAKE) -C $(packages_src) \
DESTDIR="/Volumes/$(VOLUME_NAME)/*.app/Contents/Resources" doc_format
chmod -R a-w /Volumes/$(VOLUME_NAME)/*.app/Contents/Resources
# max 5 retries
nretries=10; volm=$$(mount | grep $(VOLUME_NAME) | cut -d ' ' -f 1); sleep 5; until [[ $$nretries -le 0 ]] || hdiutil detach $$volm; do echo "detach failed, retrying"; sleep 5; nretries=$$(expr $$nretries - 1); done
# max 10 retries
nretries=10; volm=$$(mount | grep $(VOLUME_NAME) | cut -d ' ' -f 1); sleep 5; until [[ $$nretries -le 0 ]] || hdiutil detach $$volm; do echo "hdiutil detach failed, retrying"; sleep 5; nretries=$$(expr $$nretries - 1); done
rm -f "$(PACKAGE_NAME).dmg"
hdiutil convert -format UDZO -o "$(PACKAGE_NAME).dmg" build.dmg
rm -f build.dmg
Expand Down

0 comments on commit 2dd8f7d

Please sign in to comment.