Skip to content

Commit

Permalink
repeat trying to build dmg if fail
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Dec 22, 2024
1 parent d843297 commit dc1bf7b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/platform/osx/BuildMacOSImage.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,33 @@ echo -e "\n[9/9] Creating .tgz and DMG Image for distribution..."
cat $ROOT/Build.log
fi
fi

if [[ -e $OS_NAME.dmg ]]
then

else
echo -e "\n[9/9 (bis)] Creating .tgz and DMG Image for distribution... again"
{
echo killing...; sudo pkill -9 XProtect >/dev/null || true;
echo waiting...; while pgrep XProtect; do sleep 3; done;

tar -czvf @SLIC3R_APP_KEY@${VERSION_NUMBER}-$OS_NAME.tgz pack/@SLIC3R_APP_KEY@
#tar -czvf @SLIC3R_APP_KEY@-@[email protected] pack/@SLIC3R_APP_KEY@

# create dmg
hdiutil create -ov -fs HFS+ -volname "@SLIC3R_APP_KEY@" -srcfolder "pack/@SLIC3R_APP_KEY@" temp.dmg
hdiutil convert temp.dmg -format UDZO -o @SLIC3R_APP_KEY@${VERSION_NUMBER}-$OS_NAME.dmg
rm -f temp.dmg
popd
} &> $ROOT/Build.log # Capture all command output

# check if evrything went well
if [ -e $OS_NAME.dmg ]; then
echo -e "\n ... done\n"
else
# something went wrong, publish log
echo -e "\n ... fail\n"
cat $ROOT/Build.log
fi
fi

0 comments on commit dc1bf7b

Please sign in to comment.