Skip to content

Commit

Permalink
Fix notarytool args
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyTsvetkov committed Sep 8, 2023
1 parent aa4c88d commit 6d25db5
Showing 1 changed file with 10 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,16 @@ abstract class AbstractNotarizationTask @Inject constructor(
packageFile: File
) {
logger.info("Uploading '${packageFile.name}' for notarization")

val args = arrayListOf<String>().apply {
add("notarytool")
add("submit")
add("notarytool")
add("--wait")
add("--apple-id")
addAll(listOf(
"notarytool",
"submit",
"--wait",
"--apple-id",
notarization.appleID
))
if (notarization.teamID != null) {
add("--team-id")
add(notarization.teamID)
}
add(packageFile.absolutePath)
}

val args = listOfNotNull(
"notarytool",
"submit",
"--wait",
"--apple-id",
notarization.appleID,
"--team-id".takeIf { notarization.teamID != null },
notarization.teamID,
packageFile.absolutePath
)
runExternalTool(tool = MacUtils.xcrun, args = args, stdinStr = notarization.password)
}

Expand Down

0 comments on commit 6d25db5

Please sign in to comment.