Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9692E17921 for ; Tue, 31 Mar 2015 01:03:30 +0000 (UTC) Received: (qmail 47501 invoked by uid 500); 31 Mar 2015 01:03:08 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 47459 invoked by uid 500); 31 Mar 2015 01:03:08 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 47448 invoked by uid 99); 31 Mar 2015 01:03:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Mar 2015 01:03:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B2304E1081; Tue, 31 Mar 2015 01:03:07 +0000 (UTC) From: agrieve To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-android pull request: CB-8484: Adds support creating signe... Content-Type: text/plain Message-Id: <20150331010307.B2304E1081@git1-us-west.apache.org> Date: Tue, 31 Mar 2015 01:03:07 +0000 (UTC) Github user agrieve commented on a diff in the pull request: https://github.com/apache/cordova-android/pull/164#discussion_r27446054 --- Diff: bin/templates/cordova/lib/build.js --- @@ -409,7 +457,31 @@ function parseOpts(options, resolvedTarget) { console.warn('Build option \'' + options[i] + '\' not recognized (ignoring).'); } } + if (packageArgs.keystore && packageArgs.alias) { + var keystore = path.relative(ROOT, path.resolve(packageArgs.keystore)); + ret.packageInfo = new PackageInfo(keystore, packageArgs.alias, packageArgs.keystorePassword, + packageArgs.password, packageArgs.keystoreType); + } else if (fs.existsSync(buildConfig)) { + console.log('Reading build config file: '+ buildConfig); + var config = JSON.parse(fs.readFileSync(buildConfig, 'utf8')); + if (config.android && config.android[ret.buildType]) { + var androidInfo = config.android[ret.buildType]; + if (androidInfo.keystore && androidInfo.alias) { + var configDir = path.dirname(buildConfig); + var keystorePath = path.relative(ROOT, path.join(configDir, androidInfo.keystore)); + ret.packageInfo = new PackageInfo(keystorePath, androidInfo.alias, + androidInfo.keystorePassword, androidInfo.password, androidInfo.storeType); --- End diff -- A bit inconsistent to have "keystorePassword" and "storeType" (should be storePassword, or keystoreType). I think the [gradle terms](http://stackoverflow.com/questions/18328730/how-to-create-a-release-signed-apk-file-using-gradle) for these make sense, so might as well use them? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org