You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/01/31 00:16:52 UTC
[03/15] git commit: CB-5590 Have config.xml version map to
CFBundleShortVersionString instead of CFBundleVersion
CB-5590 Have config.xml version map to CFBundleShortVersionString instead of CFBundleVersion
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/4fff05fa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/4fff05fa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/4fff05fa
Branch: refs/heads/master
Commit: 4fff05fa5e41ba0368f5125baa3e68aefa695a71
Parents: 82c4f43
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Jan 21 15:53:25 2014 -0500
Committer: Steven Gill <st...@gmail.com>
Committed: Thu Jan 30 15:11:52 2014 -0800
----------------------------------------------------------------------
spec/metadata/ios_parser.spec.js | 2 +-
src/metadata/ios_parser.js | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/4fff05fa/spec/metadata/ios_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/ios_parser.spec.js b/spec/metadata/ios_parser.spec.js
index ba9a1da..4ee292c 100644
--- a/spec/metadata/ios_parser.spec.js
+++ b/spec/metadata/ios_parser.spec.js
@@ -167,7 +167,7 @@ describe('ios project parser', function () {
});
it('should write out the app version to info plist as CFBundleVersion', function(done) {
wrapper(p.update_from_config(cfg), done, function() {
- expect(plist_build.mostRecentCall.args[0].CFBundleVersion).toEqual('one point oh');
+ expect(plist_build.mostRecentCall.args[0].CFBundleShortVersionString).toEqual('one point oh');
});
});
});
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/4fff05fa/src/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/ios_parser.js b/src/metadata/ios_parser.js
index 3bc0a7b..36172e9 100644
--- a/src/metadata/ios_parser.js
+++ b/src/metadata/ios_parser.js
@@ -66,7 +66,9 @@ module.exports.prototype = {
infoPlist['CFBundleIdentifier'] = pkg;
// Update version (bundle version)
- infoPlist['CFBundleVersion'] = version;
+ infoPlist['CFBundleShortVersionString'] = version;
+ // TODO: add a way to update infoPlist['CFBundleVersion'].
+
var info_contents = plist.build(infoPlist);
info_contents = info_contents.replace(/<string>[\s\r\n]*<\/string>/g,'<string></string>');
fs.writeFileSync(plistFile, info_contents, 'utf-8');