{"action":"created","issue":{"url":"https://api.github.com/repos/laincloud/lain-sdk/issues/4","repository_url":"https://api.github.com/repos/laincloud/lain-sdk","labels_url":"https://api.github.com/repos/laincloud/lain-sdk/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/laincloud/lain-sdk/issues/4/comments","events_url":"https://api.github.com/repos/laincloud/lain-sdk/issues/4/events","html_url":"https://github.com/laincloud/lain-sdk/pull/4","id":167526898,"number":4,"title":"fix \"lain run web cmd 参数解析出错\"","user":{"login":"kaizhang-shanxi","id":20393210,"avatar_url":"https://avatars.githubusercontent.com/u/20393210?v=3","gravatar_id":"","url":"https://api.github.com/users/kaizhang-shanxi","html_url":"https://github.com/kaizhang-shanxi","followers_url":"https://api.github.com/users/kaizhang-shanxi/followers","following_url":"https://api.github.com/users/kaizhang-shanxi/following{/other_user}","gists_url":"https://api.github.com/users/kaizhang-shanxi/gists{/gist_id}","starred_url":"https://api.github.com/users/kaizhang-shanxi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaizhang-shanxi/subscriptions","organizations_url":"https://api.github.com/users/kaizhang-shanxi/orgs","repos_url":"https://api.github.com/users/kaizhang-shanxi/repos","events_url":"https://api.github.com/users/kaizhang-shanxi/events{/privacy}","received_events_url":"https://api.github.com/users/kaizhang-shanxi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-26T05:57:11Z","updated_at":"2016-07-26T08:51:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/laincloud/lain-sdk/pulls/4","html_url":"https://github.com/laincloud/lain-sdk/pull/4","diff_url":"https://github.com/laincloud/lain-sdk/pull/4.diff","patch_url":"https://github.com/laincloud/lain-sdk/pull/4.patch"},"body":"# 令 `proc.cmd` 支持类似于 `Dockerfile` 的 `exec form` 和 `shell form`，并支持 `proc.entrypoint`\r\n\r\n## 这个更改令 `proc.cmd` 支持类似于 `Dockerfile` `CMD` 的三种形式:\r\n\r\n- `cmd: [\"executable\",\"param1\",\"param2\"]` (exec form)\r\n- `cmd: [\"param1\",\"param2\"]` (as default parameters to ENTRYPOINT)\r\n- `cmd: command param1 param2` (shell form)\r\n\r\n## 这个更改使得 `proc.entrypoint` 得到支持，并可以使用 `exec form` 和 `shell form` 两种形式：\r\n\r\n- `entrypoint: [\"executable\",\"param1\",\"param2\"]` (exec form)\r\n- `entrypoint: command param1 param2` (shell form)\r\n\r\n## 测试\r\n\r\n### 测试目标\r\n\r\n- `lain build` 成功\r\n- `lain run web` 成功\r\n- `lain tag local && lain push local && lain deploy local` 成功（原来 deploy 没有问题）\r\n- `lain validate` 成功\r\n\r\n### 测试用例\r\n\r\n#### 没有 ENTRYPOINT 时（[https://github.com/kaizhang-shanxi/go-blog-on-lain](https://github.com/kaizhang-shanxi/go-blog-on-lain)）：\r\n- `web` 里不写 `cmd`，即 `cmd` 为空\r\n- 写了 `cmd`，但值为空格\r\n- `cmd: /lain/app/blog/blog`\r\n- `cmd: /lain/app/blog/blog -http=:8080`\r\n- `cmd: []`\r\n- `cmd: [\"/lain/app/blog/blog\"]`\r\n- `cmd: [\"/lain/app/blog/blog\", \"-http=:8080\"]`\r\n- `cmd: [\"/lain/app/blog/blog\", \"-http\", \":8080\"]`\r\n\r\n#### 有 ENTRYPOINT 时（[https://github.com/kaizhang-shanxi/go-blog-on-lain/tree/with-entrypoint](https://github.com/kaizhang-shanxi/go-blog-on-lain/tree/with-entrypoint)）：\r\n\r\n- `web` 里不写 `cmd`，即 `cmd` 为空\r\n- 写了 `cmd`，但值为空格\r\n- `cmd: param1`\r\n- `cmd: param1 param2`\r\n- `cmd: []`\r\n- `cmd: [\"param1\"]`\r\n- `cmd: [\"param1\", \"param2\"]`\r\n\r\n## 重要\r\n\r\n**需要同时修改 [console](https://github.com/laincloud/console/pull/6)**"},"comment":{"url":"https://api.github.com/repos/laincloud/lain-sdk/issues/comments/235202116","html_url":"https://github.com/laincloud/lain-sdk/pull/4#issuecomment-235202116","issue_url":"https://api.github.com/repos/laincloud/lain-sdk/issues/4","id":235202116,"user":{"login":"kaizhang-shanxi","id":20393210,"avatar_url":"https://avatars.githubusercontent.com/u/20393210?v=3","gravatar_id":"","url":"https://api.github.com/users/kaizhang-shanxi","html_url":"https://github.com/kaizhang-shanxi","followers_url":"https://api.github.com/users/kaizhang-shanxi/followers","following_url":"https://api.github.com/users/kaizhang-shanxi/following{/other_user}","gists_url":"https://api.github.com/users/kaizhang-shanxi/gists{/gist_id}","starred_url":"https://api.github.com/users/kaizhang-shanxi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaizhang-shanxi/subscriptions","organizations_url":"https://api.github.com/users/kaizhang-shanxi/orgs","repos_url":"https://api.github.com/users/kaizhang-shanxi/repos","events_url":"https://api.github.com/users/kaizhang-shanxi/events{/privacy}","received_events_url":"https://api.github.com/users/kaizhang-shanxi/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T08:51:06Z","updated_at":"2016-07-26T08:51:06Z","body":":blush:"}}
{"actor":{"display_login":"kaizhang-shanxi"}}