Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TIMOB-18344 CLI: the windows subcommand of ti setup should manage the windows.phone.publisherGuid value #178

Merged
merged 1 commit into from
Jan 9, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 18 additions & 18 deletions lib/commands/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ exports.config = function (logger, config, cli) {
default: 'mainmenu',
desc: __('initial screen'),
values: Object.keys(SetupScreens.prototype).filter(function (f) {
return !/^_|exit/.test(f) && (process.platform == 'darwin' || f != 'ios') && (process.platform == 'win32' || f != 'wp8');
return !/^_|exit/.test(f) && (process.platform == 'darwin' || f != 'ios') && (process.platform == 'win32' || f != 'windows');
})
}
]
Expand Down Expand Up @@ -374,20 +374,20 @@ SetupScreens.prototype.mainmenu = function mainmenu(callback) {
}
},
options: [
{ key: '__q__uick', value: 'quick', label: __('Quick Setup') },
{ key: 'chec__k__', value: 'check', label: __('Check Environment') },
{ key: '__u__ser', value: 'user', label: __('User Information') },
{ key: 'a__p__p', value: 'app', label: __('New App Defaults') },
{ key: '__n__etwork', value: 'network', label: __('Network Settings') },
{ key: '__c__li', value: 'cli', label: __('Titanium CLI Settings') },
{ key: '__s__dk', value: 'sdk', label: __('Titanium SDK Settings') },
{ key: '__i__os', value: 'ios', label: __('iOS Settings') },
{ key: '__a__ndroid', value: 'android', label: __('Android Settings') },
{ key: '__w__p8', value: 'wp8', label: __('Windows Phone 8') },
{ key: '__q__uick', value: 'quick', label: __('Quick Setup') },
{ key: 'chec__k__', value: 'check', label: __('Check Environment') },
{ key: '__u__ser', value: 'user', label: __('User Information') },
{ key: 'a__p__p', value: 'app', label: __('New App Defaults') },
{ key: '__n__etwork', value: 'network', label: __('Network Settings') },
{ key: '__c__li', value: 'cli', label: __('Titanium CLI Settings') },
{ key: '__s__dk', value: 'sdk', label: __('Titanium SDK Settings') },
{ key: '__i__os', value: 'ios', label: __('iOS Settings') },
{ key: '__a__ndroid', value: 'android', label: __('Android Settings') },
{ key: '__w__indows', value: 'windows', label: __('Windows Settings') },
//{ key: 'pa__t__hs', value: 'paths', label: __('Search Paths') },
{ key: 'e__x__it', value: 'exit', label: __('Exit') }
].filter(function (o) {
return !((o.value == 'ios' && process.platform != 'darwin') || (o.value == 'wp8' && process.platform != 'win32'));
return !((o.value == 'ios' && process.platform != 'darwin') || (o.value == 'windows' && process.platform != 'win32'));
})
}).prompt(callback);
};
Expand Down Expand Up @@ -1558,19 +1558,19 @@ SetupScreens.prototype.android = function android(callback) {
};

/**
* Configures Windows Phone 8 settings.
* Configures Windows Phone/Store settings.
* @param {Function} callback - Function to be called when the prompting finishes
*/
SetupScreens.prototype.wp8 = function wp8(callback) {
this._title(__('Windows Phone 8'));
SetupScreens.prototype.windows = function windows(callback) {
this._title(__('Windows Settings'));

fields.set({
'publisherGuid': fields.text({
promptLabel: __('What is your Publisher GUID?'),
default: this._config.get('wp8.publisherGuid')
promptLabel: __('What is your Windows Publisher ID?'),
default: this._config.get('windows.phone.publisherGuid')
})
}).prompt(function (err, data) {
!err && this._save({ wp8: data });
!err && this._save({ windows: { phone: { publisherGuid: data['publisherGuid'] } } });
callback();
}.bind(this));
};
Expand Down