Skip to content

Commit

Permalink
fixed typos and simplified conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeddr authored and mbeddr committed Aug 2, 2018
1 parent 23c3335 commit 0284181
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Parameters:
The task unpacks `rcpArtifact` into a temporary directory, unpacks
the JDK given by `jdkDependency`/`jdk` under the `jre` subdirectory of
the unpacked RCP artifact, fixes file permissions and creates missing
symlinks. If the additional properties for code singing (`signKeyChain`, `signKeyChainPassword`, `signIdentity`) are defined,
symlinks. If the additional properties for code signing (`signKeyChain`, `signKeyChainPassword`, `signIdentity`) are defined,
the application will be signed with the given certificate. Afterwards a DMG image is created and its layout is configured using the
background image. Finally, the DMG is copied to `dmgFile`.

Expand Down
8 changes: 4 additions & 4 deletions src/main/groovy/de/itemis/mps/gradle/CreateDmg.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,18 @@ class CreateDmg extends DefaultTask {
'Mac/Finder/DSStore/BuddyAllocator.pm', 'Mac/Finder/DSStore.pm']
File scriptsDir = File.createTempDir()
File dmgDir = File.createTempDir()
def getSigningInfo = [signKeyChainPassword, signKeyChain, signIdentity]
def signingInfo = [signKeyChainPassword, signKeyChain, signIdentity]
try {
BundledScripts.extractScriptsToDir(scriptsDir, scripts)
project.exec {
executable new File(scriptsDir, 'mpssign.sh')

if(getSigningInfo.every {el -> el != null}) {
if(signingInfo.every {it != null}) {
args '-r', rcpArtifact, '-o', dmgDir, '-j', jdk, '-p', signKeyChainPassword, '-k', signKeyChain, '-i', signIdentity
}else if (getSigningInfo.every {el -> el == null}){
}else if (signingInfo.every {it == null}){
args '-r', rcpArtifact, '-o', dmgDir, '-j', jdk
}else{
throw new IllegalArgumentException("Not all signing paramters set: signKeyChainPassword: ${getSigningInfo[0]}, signKeyChain: ${getSigningInfo[1]}, signIdentity: ${getSigningInfo[2]} ")
throw new IllegalArgumentException("Not all signing paramters set. signKeyChain: ${getSigningInfo[1]}, signIdentity: ${getSigningInfo[2]} and signKeyChainPassword needs to be set. ")
}
workingDir scriptsDir
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/de/itemis/mps/gradle/mpssign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ do
i) SIGN_IDENTITY="$OPTARG";;
h) echo "$USAGE"
exit 0;;
\?) echo "illegal option: -$OPTARG usage: /.mpssing.sh -r <rcp_file> -o <output_dir> [-j <jdk_file>] [-p <password keychain> -k <keychain> -i <sign identity>]" >&2
\?) echo "illegal option: -$OPTARG usage: $0 -r <rcp_file> -o <output_dir> [-j <jdk_file>] [-p <password keychain> -k <keychain> -i <sign identity>]" >&2
exit 1;;
:) echo "option: -$OPTARG requires an argument" >&2
exit 1;;
Expand Down

0 comments on commit 0284181

Please sign in to comment.