{"action":"created","issue":{"url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/165","repository_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push","labels_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/165/comments","events_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/165/events","html_url":"https://github.com/nordnet/cordova-hot-code-push/issues/165","id":158628193,"number":165,"title":"There is no way to apply development config without chcp-* argument.","user":{"login":"robario","id":1733867,"avatar_url":"https://avatars.githubusercontent.com/u/1733867?v=3","gravatar_id":"","url":"https://api.github.com/users/robario","html_url":"https://github.com/robario","followers_url":"https://api.github.com/users/robario/followers","following_url":"https://api.github.com/users/robario/following{/other_user}","gists_url":"https://api.github.com/users/robario/gists{/gist_id}","starred_url":"https://api.github.com/users/robario/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robario/subscriptions","organizations_url":"https://api.github.com/users/robario/orgs","repos_url":"https://api.github.com/users/robario/repos","events_url":"https://api.github.com/users/robario/events{/privacy}","received_events_url":"https://api.github.com/users/robario/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-06-06T08:47:40Z","updated_at":"2016-06-08T09:29:01Z","closed_at":null,"body":"This is what we want.\r\n\r\n```\r\n$ cordova build               # config-file is \"development-chcp.json\"\r\n$ cordova build --release     # config-file is \"production-chcp.json\"\r\n# or $ cordova build --release -- chcp-production     # config-file is \"production-chcp.json\"\r\n```\r\n\r\n- We don't want to add any extra arguments except for release build to reduce the number of mistakes.\r\n- We want to resolve config-file statically, NOT dynamically.\r\n\r\n## case 1:\r\n\r\n```\r\n<!-- config.xml -->\r\n<chcp>\r\n  <config-file url=\"production-chcp.json\" />\r\n</chcp>\r\n```\r\n\r\n```\r\n$ cordova build               # config-file is \"production-chcp.json\" :: wrong\r\n$ cordova build --release     # config-file is \"production-chcp.json\"\r\n```\r\n\r\n## case 2:\r\n\r\n```\r\n<!-- config.xml -->\r\n<chcp>\r\n  <config-file url=\"development-chcp.json\" />\r\n</chcp>\r\n\r\n// chcpbuild.options\r\n{\r\n  \"production\": {\r\n    \"config-file\": \"production-chcp.json\"\r\n  }\r\n}\r\n```\r\n\r\n```\r\n$ cordova build                                 # config-file is \"development-chcp.json\"\r\n$ cordova build --release                       # config-file is \"development-chcp.json\" :: wrong\r\n# $ cordova build --release -- chcp-production  # config-file is \"development-chcp.json\" :: wrong\r\n# $ cordova build -- chcp-production            # config-file is \"production-chcp.json\", but missing `--release` flag\r\n```\r\n\r\n## case 3:\r\n\r\n```\r\n<!-- config.xml -->\r\n<chcp>\r\n</chcp>\r\n\r\n// chcpbuild.options\r\n{\r\n  \"development\": {\r\n    \"config-file\": \"development-chcp.json\"\r\n  },\r\n  \"production\": {\r\n    \"config-file\": \"production-chcp.json\"\r\n  }\r\n}\r\n```\r\n\r\n```\r\n$ cordova build                                 # config-file is not set :: wrong\r\n$ cordova build --release                       # config-file is not set :: wrong\r\n# $ cordova build --release -- chcp-production  # config-file is not set :: wrong\r\n# $ cordova build -- chcp-development           # config-file is \"development-chcp.json\", but there is an extra argument\r\n# $ cordova build -- chcp-production            # config-file is \"production-chcp.json\", but missing `--release` flag\r\n```\r\n\r\n----\r\n\r\nIs there some solution in this case?\r\nMy proposal is to respect command-line arguments,\r\nit will be able to do `$ cordova build --release -- chcp-production`.\r\nAnother solution is to stop checking a `--release` flag.\r\n"},"comment":{"url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/comments/224537265","html_url":"https://github.com/nordnet/cordova-hot-code-push/issues/165#issuecomment-224537265","issue_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/165","id":224537265,"user":{"login":"robario","id":1733867,"avatar_url":"https://avatars.githubusercontent.com/u/1733867?v=3","gravatar_id":"","url":"https://api.github.com/users/robario","html_url":"https://github.com/robario","followers_url":"https://api.github.com/users/robario/followers","following_url":"https://api.github.com/users/robario/following{/other_user}","gists_url":"https://api.github.com/users/robario/gists{/gist_id}","starred_url":"https://api.github.com/users/robario/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robario/subscriptions","organizations_url":"https://api.github.com/users/robario/orgs","repos_url":"https://api.github.com/users/robario/repos","events_url":"https://api.github.com/users/robario/events{/privacy}","received_events_url":"https://api.github.com/users/robario/received_events","type":"User","site_admin":false},"created_at":"2016-06-08T09:29:01Z","updated_at":"2016-06-08T09:29:01Z","body":"Okey. I had confused about configurations and its files, too.\r\nI will be happy if I can be of any help."}}
{"actor":{"display_login":"robario"}}