{"action":"created","issue":{"url":"https://api.github.com/repos/appcelerator/titanium_mobile_windows/issues/505","labels_url":"https://api.github.com/repos/appcelerator/titanium_mobile_windows/issues/505/labels{/name}","comments_url":"https://api.github.com/repos/appcelerator/titanium_mobile_windows/issues/505/comments","events_url":"https://api.github.com/repos/appcelerator/titanium_mobile_windows/issues/505/events","html_url":"https://github.com/appcelerator/titanium_mobile_windows/pull/505","id":122208528,"number":505,"title":"Add clean command hook - WIP","user":{"login":"infosia","id":1661068,"avatar_url":"https://avatars.githubusercontent.com/u/1661068?v=3","gravatar_id":"","url":"https://api.github.com/users/infosia","html_url":"https://github.com/infosia","followers_url":"https://api.github.com/users/infosia/followers","following_url":"https://api.github.com/users/infosia/following{/other_user}","gists_url":"https://api.github.com/users/infosia/gists{/gist_id}","starred_url":"https://api.github.com/users/infosia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infosia/subscriptions","organizations_url":"https://api.github.com/users/infosia/orgs","repos_url":"https://api.github.com/users/infosia/repos","events_url":"https://api.github.com/users/infosia/events{/privacy}","received_events_url":"https://api.github.com/users/infosia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"cb1kenobi","id":97262,"avatar_url":"https://avatars.githubusercontent.com/u/97262?v=3","gravatar_id":"","url":"https://api.github.com/users/cb1kenobi","html_url":"https://github.com/cb1kenobi","followers_url":"https://api.github.com/users/cb1kenobi/followers","following_url":"https://api.github.com/users/cb1kenobi/following{/other_user}","gists_url":"https://api.github.com/users/cb1kenobi/gists{/gist_id}","starred_url":"https://api.github.com/users/cb1kenobi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cb1kenobi/subscriptions","organizations_url":"https://api.github.com/users/cb1kenobi/orgs","repos_url":"https://api.github.com/users/cb1kenobi/repos","events_url":"https://api.github.com/users/cb1kenobi/events{/privacy}","received_events_url":"https://api.github.com/users/cb1kenobi/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-12-15T07:13:13Z","updated_at":"2015-12-16T16:34:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/appcelerator/titanium_mobile_windows/pulls/505","html_url":"https://github.com/appcelerator/titanium_mobile_windows/pull/505","diff_url":"https://github.com/appcelerator/titanium_mobile_windows/pull/505.diff","patch_url":"https://github.com/appcelerator/titanium_mobile_windows/pull/505.patch"},"body":"Fix for [TIMOB-20085](https://jira.appcelerator.org/browse/TIMOB-20085)\r\n\r\nAttempt to hook `clean` command so that it deletes Visual Studio build directory.\r\n\r\nUnfortunately this does not work yet because `clean.post` event is not fired on `ti clean`. I think it is because `ti clean` command does not load hooks. I saw hooks are loaded on `ti build` but not on `ti clean`.\r\n\r\n@sgtcoolguy Could you help with this?"},"comment":{"url":"https://api.github.com/repos/appcelerator/titanium_mobile_windows/issues/comments/165167507","html_url":"https://github.com/appcelerator/titanium_mobile_windows/pull/505#issuecomment-165167507","issue_url":"https://api.github.com/repos/appcelerator/titanium_mobile_windows/issues/505","id":165167507,"user":{"login":"cb1kenobi","id":97262,"avatar_url":"https://avatars.githubusercontent.com/u/97262?v=3","gravatar_id":"","url":"https://api.github.com/users/cb1kenobi","html_url":"https://github.com/cb1kenobi","followers_url":"https://api.github.com/users/cb1kenobi/followers","following_url":"https://api.github.com/users/cb1kenobi/following{/other_user}","gists_url":"https://api.github.com/users/cb1kenobi/gists{/gist_id}","starred_url":"https://api.github.com/users/cb1kenobi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cb1kenobi/subscriptions","organizations_url":"https://api.github.com/users/cb1kenobi/orgs","repos_url":"https://api.github.com/users/cb1kenobi/repos","events_url":"https://api.github.com/users/cb1kenobi/events{/privacy}","received_events_url":"https://api.github.com/users/cb1kenobi/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T16:34:04Z","updated_at":"2015-12-16T16:34:04Z","body":"@sgtcoolguy @infosia The code looks right, but if you look at the `clean` command's code, it only fires `clean.post` if you explicitly specify the platform (i.e. `--platforms windows`) or if the `build` directory exists.\r\n\r\nFor the latter, this is probably a bug. We should probably change https://github.com/appcelerator/titanium_mobile/blob/bc85170157d3bebc5de1d61a9fe6e34bce84a8c9/cli/commands/clean.js#L117 to a simple `else` and remove the existing `else` block."}}