Skip to content

Commit

Permalink
scripts: return success if dmg unmount fails at end
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed May 30, 2023
1 parent 0c31910 commit 1994a3e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/package_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,15 @@ else
RESOURCES="/tmp/resources.$$"
cp -r "$BASEDIR/resources" "$RESOURCES"
sed -i '' "s/\/tmp\/signed\/UTM.app/\/tmp\/signed.$$\/UTM.app/g" "$RESOURCES/appdmg.json"
appdmg "$RESOURCES/appdmg.json" "$OUTPUT/UTM.dmg"
appdmg "$RESOURCES/appdmg.json" "$OUTPUT/UTM.dmg" || true
rm -rf "$RESOURCES"
else
echo "appdmg not found, falling back to non-customized DMG creation"
hdiutil create -fs HFS+ -srcfolder "$SIGNED/UTM.app" -volname "UTM" "$OUTPUT/UTM.dmg"
fi
fi
rm -rf "$SIGNED"
# sometimes appdmg may fail on unmount step
if [ ! -f "$OUTPUT/UTM.dmg" ]; then
exit 1
fi

0 comments on commit 1994a3e

Please sign in to comment.