Commit 4f9fee26 authored by Adrien's avatar Adrien

add logs

parent 7994a7c1
......@@ -61,9 +61,11 @@ class MacCodeSign {
logger.info("Building dmg...")
var dmgName = file.nameWithoutExtension
var dmgPath = file.parentFile.canonicalPath + separator + file.nameWithoutExtension + ".dmg"
logger.info("DMG Path: " + dmgPath)
processBuilder = ProcessBuilder("echo", "bonitasoft", "|", "sudo", "-S", "hdiutil", "create", "-volname", dmgName, "-srcfolder", file.canonicalPath, "-ov", "-format", "UDZO", dmgPath)
val buildDmgResult = processBuilder.inheritIO().start().waitFor()
if (buildDmgResult != 0) {
var dmg = File(dmgPath);
if (buildDmgResult != 0 || ! dmg.exists()) {
logger.error("An error occured while building dmg.")
throw BuildDmgException()
}
......@@ -79,7 +81,7 @@ class MacCodeSign {
throw SignException()
}
return File(dmgPath)
return dmg
}
fun unzip(zipFile: File) : File {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment