Commit e67ea059 authored by Adrien's avatar Adrien

delete application recursively

parent b81142a1
......@@ -77,9 +77,6 @@ class MacCodeSign {
logger.error("An error occured while building dmg.")
throw BuildDmgException()
}
if (!file.delete()) {
throw Throwable("Failed to delete temp file $file")
}
logger.info("Signing macOS dmg...")
signResult = ProcessBuilder()
......@@ -92,13 +89,17 @@ class MacCodeSign {
throw SignException()
}
if (!file.deleteRecursively()) {
logger.error("Failed to delete temp application $file")
}
return dmg
}
fun unzip(zipFile: File) : File {
ProcessBuilder()
.inheritIO()
.command("unzip", zipFile.canonicalPath, "-d", zipFile.parentFile.canonicalPath)
.command("unzip", zipFile.canonicalPath, "-r", zipFile.parentFile.canonicalPath)
.start()
.waitFor()
var file :File = File(zipFile.parentFile.canonicalPath + separator + zipFile.nameWithoutExtension + ".app")
......
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