[TIMOB-18531] Windows: Use default publisher-guid when none is given on build
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-03-29T16:08:48.000+0000 |
| Affected Version/s | Release 5.0.0 |
| Fix Version/s | Release 5.3.0 |
| Components | Windows |
| Labels | n/a |
| Reporter | Fokke Zandbergen |
| Assignee | Gary Mathews |
| Created | 2015-02-06T14:44:28.000+0000 |
| Updated | 2016-05-12T21:07:07.000+0000 |
Description
The
--win-publisher-id or -I option is required for ti build, so it must be given on every build if not set via ti setup (TIMOB-16748).
On Android, we use the the dev_keystore included in the SDK when none is given.
Would it be an option to have a similar approach for Windows and default to the 00000000-0000-1000-8000-000000000000 mentioned in the [blog](http://www.appcelerator.com/blog/2014/12/windows-platform-preview/) for example ?
I think this may make sense for development builds, but we'd likely want to enforce the user supplies one explicitly for any production/packaging builds intended to be released eitehr ad-hoc or to the stores...
Yes, for sure. And we might want to do that for Android store builds as well as I think atm it defaults to the developer keystore without notice.
PR: https://github.com/appcelerator/titanium_mobile_windows/pull/447
Reopening ticket: Windows 10 Pro VS 2015 Update 1 Appc NPM: 4.2.3-1 Appc Core: 5.2.0-239 Ti SDK: 5.2.0.v20160202103508
Steps to reproduce
Remove publisherId from you titanium config
ti config -r windows.publisherIdBuild a project using
appc run -p windows -T wp-device --deploy-type production -l traceActual result
Build errors out with the below2016-02-02T22:24:57.621Z | ERROR | An uncaught exception was thrown! Cannot read property 'indexOf' of undefined 2016-02-02T22:24:57.625Z | ERROR | Cannot read property 'indexOf' of undefined 2016-02-02T22:24:57.628Z | TRACE | TypeError: Cannot read property 'indexOf' of undefined at WindowsBuilder.initialize (C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\windows\cli\commands\_build\initialize.js:71:22) at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:689:13 at iterate (C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:265:13) at process._tickCallback (node.js:355:11) --------------------------------------------- at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:275:35 at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:44:16 at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:694:17 at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:173:37 at WindowsBuilder.doAnalytics (C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\windows\cli\commands\_build\analytics.js:56:2) at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:689:13 at iterate (C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:265:13) at process._tickCallback (node.js:355:11) --------------------------------------------- at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:275:35 at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:44:16 at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:694:17 at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:173:37 at C:\Users\ewanh\.appcelerator\install\5.2.0-239\package\node_modules\titanium\node_modules\async\lib\async.js:52:16 at WindowsBuilder.done (C:\Users\ewanh\.appcelerator\install\5.2.0-239\package\node_modules\titanium\node_modules\async\lib\async.js:248:21) at WindowsBuilder.<anonymous> (C:\Users\ewanh\.appcelerator\install\5.2.0-239\package\node_modules\titanium\node_modules\async\lib\async.js:44:16) at CLI._fireHookCallback (C:\Users\ewanh\.appcelerator\install\5.2.0-239\package\node_modules\titanium\lib\hook.js:269:12) at C:\Users\ewanh\.appcelerator\install\5.2.0-239\package\node_modules\titanium\lib\hook.js:248:10Expected result
Based off the discussion on the pull request, I believe the build should prompt for a publisherId *Note* Also when building fordist-winstoreordist-phonestorethere is no prompt asking for a publisherIdSeems like publisherId is null instead of expected string here: https://github.com/garymathews/titanium_mobile_windows/blob/1c1ba7fc02e5a93b3a0b3612f2b5c08cd2fe53c3/cli/commands/_build/initialize.js#L67
I was imprecise in my language as I said "production/packaging" builds should prompt. You thought of a test case I hadn't considered, which was a production deploy type on device - I was thinking simply the dist-phonestore and dist-winstore targets. But in this case, if you're explicitly choosing production deploy type, then yeah it probably also makes sense to force a real publisherid here.
PR: https://github.com/appcelerator/titanium_mobile_windows/pull/567
Reopening ticket: Windows 10 Pro Appc NPM: 4.2.4-2 Appc Core: 5.2.1-17 Titanium SDK: 5.3.0.v20160318230005
Steps to reproduce
1. Remove publisherId from you titanium configti config -r windows.publisherId2. Build a project usingappc run -p windows -T dist-phonestoreActual result
When building todist-phonestoreordist-winstorethe CLI does not prompt for a publsiher-guid.Expected result
I should be prompted to enter a guid when building fordist-phonestoreordist-winstore[~gmathews] Can you take a look? This got re-opened again...
If I understand correctly currently prompt is shown only when
deploy-typeisproduction. [cli/commands/_build/config/winPublisherId.js](https://github.com/appcelerator/titanium_mobile_windows/pull/567/files)So perhaps this is just an issue of us not defaulting deployType to 'production' on dist-* target builds?
https://github.com/appcelerator/titanium_mobile_windows/pull/597
Verified using: Windows 10 Pro Visual Studio 2015 Community Update 2 Appc Core: 5.3.0-43 Appc NPM: 4.2.5-5 Ti SDK: 5.3.0.v20160512105713 Prompt for publisher-guid is now shown when packaging the app for dist-winstore and dist-phonestore and also when building with
\--deploy-typeset to production for wp-emulator, wp-device and ws-local. Closing ticket