{ "id": "100456", "key": "TIMOB-10772", "fields": { "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true }, "parent": { "id": "89765", "key": "TIMOB-8652", "fields": { "summary": "Core: Create a new Titanium Command Line Interface", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false } } }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14160", "description": "Sprint 2012-19 JS", "name": "Sprint 2012-19 JS", "archived": true, "released": true, "releaseDate": "2012-09-24" }, { "id": "14271", "description": "2012 Sprint 19", "name": "2012 Sprint 19", "archived": true, "released": true, "releaseDate": "2012-09-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-17T23:35:20.000+0000", "created": "2012-09-04T17:44:22.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "20861", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "outwardIssue": { "id": "94669", "key": "TISTUD-1881", "fields": { "summary": "Add CLI command support for adding a new platform to an existing project", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-03-08T00:40:10.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": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "A command that allows you to easily add and edit the tiapp.xml. The keys should be well defined (i.e. deployments, etc).\r\n\r\nNOTE: Not all tiapp.xml options should be exposed.\r\n\r\nSome keys must trigger an action such as when setting a deployment-target, we need to non-destructively (i.e. check destination does not already exist) copy that deployment-target's resources into the project's Resources dir. We need an optional --template option with a default value \"default\". This is only used when setting the \"deployment-targets\" so we know which files to copy.\r\n\r\nModel this command after the \"config\" command in the \"titanium\" repo.\r\n\r\nIf --dir is not specified, set the dir to '.' and then check if dir is a Titanium project (i.e. contains a tiapp.xml).\r\n\r\nValidate everything: project dir, tiapp.xml exists, tiapp parses correctly, key name, template exists (only copy if exists), source files, destination dir, etc).\r\n\r\nThis command will need to be done in the titanium_mobile/support/cli/commands/project.js file. Use the super neato tiapp.xml library in titanium-sdk:\r\n\r\n{code}\r\n// please remember to convert all indent spaces to tabs\r\nvar ti = require('titanium-sdk'),\r\n path = require('path');\r\n\r\nexports.validate = function (logger, config, cli) {\r\n cli.argv.dir = ti.validateProjectDir(logger, cli.argv.dir);\r\n};\r\n\r\nexports.run = function (logger, config, cli) {\r\n var tiapp = new ti.tiappxml(path.join(cli.argv.dir, 'tiapp.xml'));\r\n // check cli.argv._ to see how many args are passed in. check config command for example.\r\n // if no args, show all keys.\r\n // if one arg, validate key name, then show just that one arg's value (no key, no quotes)\r\n // if two args, set the value, save the file, perform any special actions\r\n};\r\n{code}\r\n\r\nExamples:\r\n\r\n{code}\r\n# list all keys\r\n> titanium project --dir /path/to/project\r\nid = \"ti.testapp\"\r\nname = \"testapp\"\r\nversion = \"1.0\"\r\npublisher = \"not specified\"\r\ndescription = \"not specified\"\r\nsdk-version = \"3.0.0\"\r\ndeployment-targets = \"android,iphone,mobileweb\"\r\n{code}\r\n\r\n{code}\r\n# get some values\r\n> titanium project sdk-version --dir /path/to/project\r\n3.0.0\r\n{code}\r\n\r\n{code}\r\n# set some values\r\n> titanium project description \"My first app\" --dir /path/to/project\r\nDescription saved\r\n\r\n> titanium project deployment-targets android,iphone,mobileweb --dir /path/to/project\r\nDeployment Targets saved\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "CLI: \"project\" command", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": null, "closedSprints": [ { "id": 3, "state": "closed", "name": "Release 3.0.0", "startDate": "2012-09-27T05:26:46.636Z", "endDate": "2012-10-08T20:05:00.000Z", "completeDate": "2012-12-20T17:03:19.403Z" } ], "comment": { "comments": [ { "id": "219166", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull Requests:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/2977\r\nhttps://github.com/appcelerator/node-appc/pull/2", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-15T21:46:21.000+0000", "updated": "2012-09-15T21:46:21.000+0000" }, { "id": "409753", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as resolved.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-08T00:40:10.000+0000", "updated": "2017-03-08T00:40:10.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }