Add option to copy created binary to shared folder

This commit is contained in:
Christoph Atteneder 2021-01-12 19:05:09 +01:00
parent 808749da20
commit 8416f56f06
No known key found for this signature in database
GPG Key ID: CD5DC1C529CDFD3B

View File

@ -364,7 +364,10 @@ task packageInstallers {
macOpts +
" --type dmg")
// macOS step 5: Sign dmg bundle
// macOS step 5: Delete unused app image
delete(bisqAppImageFullPath)
// macOS step 6: Sign dmg bundle
executeCmd("codesign" +
" --sign \"${envVariableSigningID}\"" +
" --options runtime" +
@ -373,7 +376,7 @@ task packageInstallers {
" --deep" +
" '${binariesFolderPath}/Bisq-${appVersion}.dmg'")
// macOS step 6: Upload for notarization
// macOS step 7: Upload for notarization
// See https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow#3087734
String envVariableAcUsername = "$System.env.BISQ_PACKAGE_NOTARIZATION_AC_USERNAME"
String envVariableAscProvider = "$System.env.BISQ_PACKAGE_NOTARIZATION_ASC_PROVIDER"
@ -417,12 +420,11 @@ task packageInstallers {
if (notarizationEndedInSuccess) {
println "Notarization was successful"
// macOS step 7: Staple ticket on dmg
// macOS step 8: Staple ticket on dmg
executeCmd("xcrun stapler staple" +
" '${binariesFolderPath}/Bisq-${appVersion}.dmg'")
}
} else {
// If user didn't confirm the optional signing step, then generate a plain non-signed dmg
executeCmd(jPackageFilePath + commonOpts + macOpts + " --type dmg")
@ -458,6 +460,20 @@ task packageInstallers {
" --type rpm")
}
// Env variable can be set by calling "export BISQ_SHARED_FOLDER='Some value'"
// This is to copy the final binary/ies to a shared folder for further processing if a VM is used.
String envVariableSharedFolder = "$System.env.BISQ_SHARED_FOLDER"
println "Environment variable BISQ_SHARED_FOLDER is: ${envVariableSharedFolder}"
ant.input(message: "Copy the created binary to a shared folder? (y=yes, n=no)",
addproperty: "copy-to-shared-folder",
validargs: "y,n")
if (ant.properties['copy-to-shared-folder'] == 'y') {
copy {
from binariesFolderPath
into envVariableSharedFolder
}
}
println "The binaries are ready:"
binariesFolderPath.traverse {
println it.path