{ "id": "142032", "key": "ALOY-1232", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "16596", "name": "Alloy 1.6.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-02-17T15:17:09.000+0000", "created": "2014-12-22T21:51:49.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "TCSupport", "alloy-configuration", "android", "cli" ], "versions": [], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2015-03-25T19:42:49.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "13604", "name": "Tooling", "description": "Items related to Alloy tooling and workflow" } ], "description": "h4. Problem Description\r\nThe argument --deploy-type or -D is ignored if the target is android, always generating 'development' for emulator and 'test' for device, even if specified the other way. iOS works fine. I didn't test all the others platforms.\r\n\r\nh4. Steps to reproduce\r\nSince we use these settings to trigger our testing scripts, figured I'd give it a test. Ti.App.deployType seems to work fine here. But your settings from the config.json file do not.\r\nadded the following to my alloy.js to test faster:\r\n{code}\r\nconsole.log('Ti.App.deployType: ', Ti.App.deployType);\r\nconsole.log('Alloy.CFG: ', Alloy.CFG);\r\n{code}\r\n\r\nResults:\r\nGenymotion Google Nexus 5 - 5.0.0 - API 21 - 1080x1920 (5.0.0)\r\n{code}\r\n[INFO] Ti.App.deployType: test\r\n[INFO] Alloy.CFG: {\"dependencies\":{},\"TEST_STRING\":\"TEST ENV\"}\r\n{code}\r\n{code}\r\n[INFO] Ti.App.deployType: development\r\n[INFO] Alloy.CFG: {\"dependencies\":{},\"TEST_STRING\":\"TEST ENV\"}\r\n{code}\r\n\r\nGenymotion Samsung Galaxy S5 - 4.4.4 - API 19 - 1080x1920 (4.4.4)\r\n{code}\r\n[INFO] Ti.App.deployType: test\r\n[INFO] Alloy.CFG: {\"dependencies\":{},\"TEST_STRING\":\"TEST ENV\"}\r\n{code}\r\n{code}\r\n[INFO] Ti.App.deployType: development\r\n[INFO] Alloy.CFG: {\"dependencies\":{},\"TEST_STRING\":\"TEST ENV\"}\r\n{code}\r\n\r\nDevice Samsung S4\r\n{code}\r\n12-22 20:32:56.028: I/TiAPI(17077): Ti.App.deployType: development\r\n12-22 20:32:56.028: I/TiAPI(17077): Alloy.CFG: {\"dependencies\":{},\"TEST_STRING\":\"TEST ENV\"}\r\n{code}\r\n{code}\r\n12-22 20:34:35.465: I/TiAPI(18183): Ti.App.deployType: test\r\n12-22 20:34:35.475: I/TiAPI(18183): Alloy.CFG: {\"dependencies\":{},\"TEST_STRING\":\"TEST ENV\"}\r\n{code}\r\n\r\nh4. Steps to reproduce\r\nI used these commands for testing:\r\n{code}\r\nti build -p android -D development --device-id ?\r\n{code}\r\n\r\n{code}\r\nti build -p android -D test --device-id ?\r\n{code}\r\n\r\n{code}\r\nti build -p android -D development -T device\r\n{code}\r\n\r\n{code}\r\nti build -p android -D test -T device\r\n{code}\r\n\r\nh4. Extra info\r\nSeems like CFG.js doesn't get updated under resources once you switch the deployType flag. Deleting the content of Resources (aka forcing regeneration of CFG.js) will go and use the right config.", "attachment": [ { "id": "53332", "filename": "Test.zip", "author": { "name": "pablog178", "key": "pablog178", "displayName": "Pablo Guevara", "active": true, "timeZone": "America/New_York" }, "created": "2014-12-22T21:51:49.000+0000", "size": 331498, "mimeType": "application/zip" } ], "flagged": false, "summary": "--deploy-type ignored on android builds for emulator and device", "creator": { "name": "pablog178", "key": "pablog178", "displayName": "Pablo Guevara", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "pablog178", "key": "pablog178", "displayName": "Pablo Guevara", "active": true, "timeZone": "America/New_York" }, "environment": "Operating System\r\n Name = Mac OS X\r\n Version = 10.10.1\r\n Architecture = 64bit\r\n # CPUs = 8\r\n Memory = 16.0GB\r\n\r\nNode.js\r\n Node.js Version = 0.10.33\r\n npm Version = 1.4.28\r\n\r\nTitanium CLI\r\n CLI Version = 3.4.1\r\n node-appc Version = 0.2.14\r\n\r\nAlloy version = 1.5.1\r\n", "closedSprints": [ { "id": 339, "state": "closed", "name": "2015 Sprint 04 Tooling", "startDate": "2015-02-14T02:34:21.061Z", "endDate": "2015-02-28T02:34:00.000Z", "completeDate": "2015-02-28T15:51:32.596Z", "originBoardId": 121 } ], "comment": { "comments": [ { "id": "337382", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "Since we use these settings to trigger our testing scripts, figured I'd give it a test. Ti.App.deployType seems to work fine here. But your settings from the config.json file do not.\r\nadded the following to my alloy.js to test faster:\r\n{code}\r\nconsole.log('Ti.App.deployType: ', Ti.App.deployType);\r\nconsole.log('Alloy.CFG: ', Alloy.CFG);\r\n{code}\r\n\r\nResults:\r\nGenymotion Google Nexus 5 - 5.0.0 - API 21 - 1080x1920 (5.0.0)\r\n{code}\r\n[INFO] Ti.App.deployType: test\r\n[INFO] Alloy.CFG: {\"dependencies\":{},\"TEST_STRING\":\"TEST ENV\"}\r\n{code}\r\n{code}\r\n[INFO] Ti.App.deployType: development\r\n[INFO] Alloy.CFG: {\"dependencies\":{},\"TEST_STRING\":\"TEST ENV\"}\r\n{code}\r\n\r\nGenymotion Samsung Galaxy S5 - 4.4.4 - API 19 - 1080x1920 (4.4.4)\r\n{code}\r\n[INFO] Ti.App.deployType: test\r\n[INFO] Alloy.CFG: {\"dependencies\":{},\"TEST_STRING\":\"TEST ENV\"}\r\n{code}\r\n{code}\r\n[INFO] Ti.App.deployType: development\r\n[INFO] Alloy.CFG: {\"dependencies\":{},\"TEST_STRING\":\"TEST ENV\"}\r\n{code}\r\n\r\nDevice Samsung S4\r\n{code}\r\n12-22 20:32:56.028: I/TiAPI(17077): Ti.App.deployType: development\r\n12-22 20:32:56.028: I/TiAPI(17077): Alloy.CFG: {\"dependencies\":{},\"TEST_STRING\":\"TEST ENV\"}\r\n{code}\r\n{code}\r\n12-22 20:34:35.465: I/TiAPI(18183): Ti.App.deployType: test\r\n12-22 20:34:35.475: I/TiAPI(18183): Alloy.CFG: {\"dependencies\":{},\"TEST_STRING\":\"TEST ENV\"}\r\n{code}", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2014-12-23T01:36:40.000+0000", "updated": "2014-12-23T01:39:39.000+0000" }, { "id": "341129", "author": { "name": "cesar.cavazos", "key": "cesar.cavazos", "displayName": "Cesar Cavazos", "active": true, "timeZone": "America/Los_Angeles" }, "body": "My 2 cents here:\r\n\r\nSeems like CFG.js doesn't get updated under resources once you switch the deployType flag. Deleting the content of Resources (aka forcing regeneration of CFG.js) will go and use the right config.", "updateAuthor": { "name": "cesar.cavazos", "key": "cesar.cavazos", "displayName": "Cesar Cavazos", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-01-29T02:56:00.000+0000", "updated": "2015-01-29T02:56:00.000+0000" }, { "id": "341292", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "[~pablog178] is the original reporter for this ticket. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2015-01-29T23:38:22.000+0000", "updated": "2015-01-29T23:38:22.000+0000" }, { "id": "342030", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "I think this is solved by the change in ALOY-1206. [~mpmiranda] could you test and confirm with the customer that this would resolve their issue? ", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2015-02-04T14:27:54.000+0000", "updated": "2015-02-04T14:27:54.000+0000" }, { "id": "343503", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR: https://github.com/appcelerator/alloy/pull/665\r\n\r\nFunctional Test:\r\nFollow the steps to reproduce stated above, and confirm that {{Resources/alloy/CFG.js}} has the correct {{TEST_STRING}} value for each android build.\r\n{code}\r\n// device\r\nti build -p android -D development -T device --device-id xxx // should be DEV ENV\r\nti build -p android -D test -T device --device-id xxx // should be TEST ENV\r\n\r\n// emulator\r\nti build -p android -D development // should be DEV ENV\r\nti build -p android -D test // should be TEST ENV\r\n{code}", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-02-16T15:14:36.000+0000", "updated": "2015-02-16T15:14:36.000+0000" }, { "id": "343533", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "FR & CR pass, merged to master, cherry-picked to 1_6_X", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2015-02-17T15:17:09.000+0000", "updated": "2015-02-17T15:17:09.000+0000" }, { "id": "347324", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed using:\r\n\r\nTitanium SDK 4.0.0.v20150323131014\r\nStudio 4.0.0.201503231407\r\nAppc NPM: 0.3.34\r\nAppc CLI 0.2.187\r\nAlloy 1.6.0-alpha\r\n\r\nThe correct {{TEST_STRING}} is printed when using {{-D development}} and {{-D test}}.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-25T19:42:49.000+0000", "updated": "2015-03-25T19:42:49.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }