Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CB-5669 Add --no-signing flag to build
  • Loading branch information
bryanhiggins committed Dec 18, 2013
1 parent 363f611 commit 868e7b0216f49e8d67e3b1492d03ebfbcff4aa38
Showing 1 changed file with 18 additions and 15 deletions.
@@ -45,15 +45,16 @@ function copyArgIfExists(arg) {
}

command
.usage('[--debug] [--release] [--query] [-k | --keystorepass] [-b | --buildId <number>] [-p | --params <json>] [-ll | --loglevel <level>]')
.usage('[--debug | --release] [--query] [-k | --keystorepass] [-b <number> | --buildId <number>] [-p <json> | --params <json>] [-ll <level> | --loglevel <level>] [--web-inspector] [--no-signing]')
.option('--debug', 'build in debug mode.')
.option('--release', 'build in release mode. This will sign the resulting bar.')
.option('--query', 'query on the commandline when a password is needed')
.option('-k, --keystorepass <password>', 'signing key password')
.option('-b, --buildId <num>', 'specifies the build number for signing (typically incremented from previous signing).')
.option('-d, --web-inspector', 'enables webinspector. Enabled by default in debug mode.).')
.option('-p, --params <params JSON file>', 'specifies additional parameters to pass to downstream tools.')
.option('-ll, --loglevel <loglevel>', 'set the logging level (error, warn, verbose)');
.option('-ll, --loglevel <loglevel>', 'set the logging level (error, warn, verbose)')
.option('--web-inspector', 'enables webinspector. Enabled by default in debug mode.).')
.option('--no-signing', 'when building in release mode, this will skip signing');

try {
command.parse(process.argv);
@@ -82,18 +83,20 @@ try {

if (command.release) {
copyArgIfExists("buildId");
//Note: Packager refers to signing password as "password" not "keystorepass"
bbwpArgv.push("--password");
if (keystorepass) {
bbwpArgv.push(keystorepass);
} else if (command.query) {
childTasks.push(utils.prompt.bind(this, {description: "Please enter your keystore password: ", hidden: true}));
childTasks.push(function (password, done) {
bbwpArgv.push(password);
done();
});
} else {
err = "No signing password provided. Please enter a value for 'keystorepass' in " + pkgrUtils.homedir() + "/.cordova/blackberry10.json or use --keystorepass via command-line";
if (command.signing) {
//Note: Packager refers to signing password as "password" not "keystorepass"
bbwpArgv.push("--password");
if (keystorepass) {
bbwpArgv.push(keystorepass);
} else if (command.query) {
childTasks.push(utils.prompt.bind(this, {description: "Please enter your keystore password: ", hidden: true}));
childTasks.push(function (password, done) {
bbwpArgv.push(password);
done();
});
} else {
err = "No signing password provided. Please enter a value for 'keystorepass' in " + pkgrUtils.homedir() + "/.cordova/blackberry10.json or use --keystorepass via command-line";
}
}
}

0 comments on commit 868e7b0

Please sign in to comment.