Skip to content

Commit

Permalink
Merge pull request #5691 from cb1kenobi/timob-14878
Browse files Browse the repository at this point in the history
[TIMOB-14878] [TIMOB-16555] [TIMOB-16674] Version number formatting fixes!
  • Loading branch information
skypanther committed May 16, 2014
2 parents 78863b1 + 8b5fd65 commit de4fd6e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
8 changes: 6 additions & 2 deletions android/cli/lib/AndroidManifest.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Titanium SDK Library for Node.js
* Copyright (c) 2012-2013 by Appcelerator, Inc. All Rights Reserved.
* Copyright (c) 2012-2014 by Appcelerator, Inc. All Rights Reserved.
* Please see the LICENSE file for information about licensing.
*/

Expand Down Expand Up @@ -229,7 +229,11 @@ function toXml(dom, parent, name, value) {
function initAttr(node, obj) {
xml.forEachAttr(node, function (attr) {
obj.__attr__ || (obj.__attr__ = {});
obj.__attr__[attr.name] = xml.parse(attr.value);
if (attr.name == 'android:versionName') {
obj.__attr__[attr.name] = attr.value;
} else {
obj.__attr__[attr.name] = xml.parse(attr.value);
}
});
return obj;
}
Expand Down
14 changes: 6 additions & 8 deletions iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @module cli/_build
*
* @copyright
* Copyright (c) 2009-2013 by Appcelerator, Inc. All Rights Reserved.
* Copyright (c) 2009-2014 by Appcelerator, Inc. All Rights Reserved.
*
* @license
* Licensed under the terms of the Apache Public License
Expand Down Expand Up @@ -1819,15 +1819,13 @@ iOSBuilder.prototype.createInfoPlist = function createInfoPlist(next) {

plist.CFBundleIdentifier = this.tiapp.id;

// device builds require an additional token to ensure uniquiness so that iTunes will detect an updated app to sync
if (this.config.get('app.skipVersionValidation') || this.tiapp.properties['ti.skipVersionValidation']) {
plist.CFBundleVersion = this.tiapp.version;
} else if (this.target == 'device') {
plist.CFBundleVersion = appc.version.format(this.tiapp.version, 3, 3) + '.' + (new Date).getTime();
if (this.target == 'device' && this.deviceId == 'itunes') {
// device builds require an additional token to ensure uniqueness so that iTunes will detect an updated app to sync
plist.CFBundleVersion = this.tiapp.version + '.' + (new Date).getTime();
} else {
plist.CFBundleVersion = appc.version.format(this.tiapp.version, 3, 3);
plist.CFBundleVersion = this.tiapp.version;
}
plist.CFBundleShortVersionString = plist.CFBundleVersion;
plist.CFBundleShortVersionString = appc.version.format(plist.CFBundleVersion, 0, 3);

Array.isArray(plist.CFBundleIconFiles) || (plist.CFBundleIconFiles = []);
['.png', '@2x.png', '-72.png', '-60.png', '-60@2x.png', '-76.png', '-76@2x.png', '-Small-50.png', '-72@2x.png', '-Small-50@2x.png', '-Small.png', '-Small@2x.png', '-Small-40.png', '-Small-40@2x.png'].forEach(function (name) {
Expand Down

0 comments on commit de4fd6e

Please sign in to comment.