Require user R3CEV for DemoBench DMG signing key. (#737)

This commit is contained in:
Chris Rankin
2017-05-25 14:12:58 +01:00
committed by GitHub
parent 9f2b44f8f7
commit 35ee60f12b
2 changed files with 9 additions and 4 deletions

View File

@ -9,6 +9,7 @@ buildscript {
ext.pkg_outDir = "$buildDir/javapackage" ext.pkg_outDir = "$buildDir/javapackage"
ext.dist_source = "$pkg_source/demobench-$version" ext.dist_source = "$pkg_source/demobench-$version"
ext.pkg_version = "$version".indexOf('-') >= 0 ? "$version".substring(0, "$version".indexOf('-')) : version ext.pkg_version = "$version".indexOf('-') >= 0 ? "$version".substring(0, "$version".indexOf('-')) : version
ext.pkg_macosxKeyUserName = 'R3CEV'
repositories { repositories {
mavenLocal() mavenLocal()
@ -160,8 +161,9 @@ task javapackage(dependsOn: distZip) {
include '**/*.wsf' include '**/*.wsf'
include '**/*.manifest' include '**/*.manifest'
} }
filter { filter { line ->
line -> line.replaceAll('@pkg_version@', pkg_version) line.replaceAll('@pkg_version@', pkg_version)
.replaceAll('@signingKeyUserName@', pkg_macosxKeyUserName)
} }
into "$pkg_source/package" into "$pkg_source/package"
} }
@ -193,6 +195,9 @@ task javapackage(dependsOn: distZip) {
} }
} }
// This is specific to MacOSX packager.
bundleArgument(arg: 'mac.signing-key-user-name', value: pkg_macosxKeyUserName)
platform { platform {
property(name: 'java.util.logging.config.class', value: 'net.corda.demobench.config.LoggingConfig') property(name: 'java.util.logging.config.class', value: 'net.corda.demobench.config.LoggingConfig')
property(name: 'org.jboss.logging.provider', value: 'slf4j') property(name: 'org.jboss.logging.provider', value: 'slf4j')

View File

@ -9,7 +9,7 @@ function signApplication() {
# Resign the embedded JRE because we have included "bin/java" # Resign the embedded JRE because we have included "bin/java"
# after javapackager had already signed the JRE installation. # after javapackager had already signed the JRE installation.
if ! (codesign --force --sign "$IDENTITY" --verbose "$APPDIR/Contents/PlugIns/Java.runtime"); then if ! (codesign --force --sign "$IDENTITY" --preserve-metadata=identifier,entitlements,requirements --verbose "$APPDIR/Contents/PlugIns/Java.runtime"); then
echo "**** Failed to resign the embedded JVM" echo "**** Failed to resign the embedded JVM"
return 1 return 1
fi fi
@ -27,7 +27,7 @@ fi
cd .. cd ..
# Sign the application using a 'Developer ID Application' key on our keychain. # Sign the application using a 'Developer ID Application' key on our keychain.
if ! (signApplication "Corda DemoBench.app" "Developer ID Application: "); then if ! (signApplication "Corda DemoBench.app" "Developer ID Application: @signingKeyUserName@"); then
echo "**** Failed to sign the application - ABORT SIGNING" echo "**** Failed to sign the application - ABORT SIGNING"
fi fi