Use macOS dmg template on travis.

This commit is contained in:
Pentarctagon 2020-03-09 09:54:33 -05:00 committed by Pentarctagon
parent 046c0a0f80
commit 1487fec273

View file

@ -9,9 +9,11 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
BUILD_RET=$?
if [ "$UPLOAD_ID" != "" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
# workaround for a bug in hdiutil where it freezes if multiple srcfolder-s are specified
cp -R "build/$CFG/The Battle for Wesnoth.app" "../../packaging/macos/The Battle for Wesnoth.app"
hdiutil create -volname "Wesnoth_${CFG}" -fs 'HFS+' -srcfolder ../../packaging/macos -ov -format UDBZ "Wesnoth_${CFG}.dmg"
hdiutil convert ../../packaging/macOS/Wesnoth_dmg_packaging_template.dmg -format UDRW -o "Wesnoth_RW.dmg"
hdiutil attach "Wesnoth_RW.dmg"
cp -R "build/$CFG/The Battle for Wesnoth.app/." "/Volumes/The Battle for Wesnoth/The Battle for Wesnoth.app"
hdiutil detach "/Volumes/The Battle for Wesnoth"
hdiutil convert "Wesnoth_RW.dmg" -format UDBZ -o "Wesnoth_${CFG}.dmg"
./../../utils/travis/sftp "Wesnoth_${CFG}.dmg"
fi