createBundleDmg %Y%m%d%H%M%S timestamp tempDir /tmp/.tmpDir${timestamp} installerBasename (swiftinstaller-macos-\d+-\d.\d.\d).app \1 ${project.installerFilename} dmgName ${project.outputDirectory}/${installerBasename}.dmg tempDmgFile ${tempDir}/tmp.dmg ${project.outputDirectory}/${installerBasename}.dmg ${tempDir} ${tempDir}/output ${tempDir}/mnt ${tempDir}/output ${project.outputDirectory}/${project.installerFilename} ${tempDir}/output/.background ${tempDir}/output/.background/background.png ${build_project_directory}/../images/background.png hdiutil create -srcfolder "${tempDir}/output" -volname "${project.fullName}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW "${tempDmgFile}" 0 hdiutil detach "/Volumes/${project.fullName}" 0 hdiutil attach -readwrite -noverify -noautoopen "${tempDmgFile}" hdiutil detach "/Volumes/${project.fullName}" hdiutil convert "${tempDmgFile}" -format UDZO -imagekey zlib-level=9 -o "${dmgName}" ${tempDir} 1 40 1 40 1 40