{"action":"created","comment":{"url":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls/comments/87983244","pull_request_review_id":8570537,"id":87983244,"diff_hunk":"@@ -335,12 +336,34 @@ function port_forward {\n     kubectl --context=\"$(context)\" --namespace=\"$(namespace)\" port-forward \"$POD\" \"$LOCAL_PORT\":\"$REMOTE_PORT\"\n }\n \n+function check_version {\n+\n+    CURRENT_VERSION=`cat ${0} | grep \"^# Version\" | head -1 | awk '{print $3}'`\n+    LATEST_VERSION=`curl -s https://raw.githubusercontent.com/continuouspipe/remote-environment-client/gh-pages/downloads/cp-remote-latest | grep \"# Version\" | awk '{print $3}'`\n+\n+    if [ $CURRENT_VERSION != $LATEST_VERSION ]; then\n+        echo\n+        echo \"You do not have the latest version of this tool.\"\n+        echo\n+        echo \"You are using version $CURRENT_VERSION\"\n+        echo \"To install $LATEST_VERSION run:\"\n+        echo\n+        echo \"sudo curl https://continuouspipe.github.io/remote-environment-client/downloads/cp-remote-latest > /usr/local/bin/cp-remote\"","path":"cp-remote","position":24,"original_position":24,"commit_id":"abddfbf077e5bf5bae8b64705f97baa85090ae2c","original_commit_id":"abddfbf077e5bf5bae8b64705f97baa85090ae2c","user":{"login":"richardmiller","id":783827,"avatar_url":"https://avatars.githubusercontent.com/u/783827?v=3","gravatar_id":"","url":"https://api.github.com/users/richardmiller","html_url":"https://github.com/richardmiller","followers_url":"https://api.github.com/users/richardmiller/followers","following_url":"https://api.github.com/users/richardmiller/following{/other_user}","gists_url":"https://api.github.com/users/richardmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/richardmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardmiller/subscriptions","organizations_url":"https://api.github.com/users/richardmiller/orgs","repos_url":"https://api.github.com/users/richardmiller/repos","events_url":"https://api.github.com/users/richardmiller/events{/privacy}","received_events_url":"https://api.github.com/users/richardmiller/received_events","type":"User","site_admin":false},"body":"Nope, I just copied it from the readme","created_at":"2016-11-15T10:03:20Z","updated_at":"2016-11-15T10:03:20Z","html_url":"https://github.com/continuouspipe/remote-environment-client/pull/35#discussion_r87983244","pull_request_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls/comments/87983244"},"html":{"href":"https://github.com/continuouspipe/remote-environment-client/pull/35#discussion_r87983244"},"pull_request":{"href":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls/35","id":93603268,"html_url":"https://github.com/continuouspipe/remote-environment-client/pull/35","diff_url":"https://github.com/continuouspipe/remote-environment-client/pull/35.diff","patch_url":"https://github.com/continuouspipe/remote-environment-client/pull/35.patch","issue_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/issues/35","number":35,"state":"open","locked":false,"title":"Add command to check the version of the script","user":{"login":"richardmiller","id":783827,"avatar_url":"https://avatars.githubusercontent.com/u/783827?v=3","gravatar_id":"","url":"https://api.github.com/users/richardmiller","html_url":"https://github.com/richardmiller","followers_url":"https://api.github.com/users/richardmiller/followers","following_url":"https://api.github.com/users/richardmiller/following{/other_user}","gists_url":"https://api.github.com/users/richardmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/richardmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardmiller/subscriptions","organizations_url":"https://api.github.com/users/richardmiller/orgs","repos_url":"https://api.github.com/users/richardmiller/repos","events_url":"https://api.github.com/users/richardmiller/events{/privacy}","received_events_url":"https://api.github.com/users/richardmiller/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-14T16:50:40Z","updated_at":"2016-11-15T10:03:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3196564166cac2f501d1e900befea992ef7e4592","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls/35/commits","review_comments_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls/35/comments","review_comment_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/issues/35/comments","statuses_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/statuses/abddfbf077e5bf5bae8b64705f97baa85090ae2c","head":{"label":"continuouspipe:add-version-check-command","ref":"add-version-check-command","sha":"abddfbf077e5bf5bae8b64705f97baa85090ae2c","user":{"login":"continuouspipe","id":14802577,"avatar_url":"https://avatars.githubusercontent.com/u/14802577?v=3","gravatar_id":"","url":"https://api.github.com/users/continuouspipe","html_url":"https://github.com/continuouspipe","followers_url":"https://api.github.com/users/continuouspipe/followers","following_url":"https://api.github.com/users/continuouspipe/following{/other_user}","gists_url":"https://api.github.com/users/continuouspipe/gists{/gist_id}","starred_url":"https://api.github.com/users/continuouspipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/continuouspipe/subscriptions","organizations_url":"https://api.github.com/users/continuouspipe/orgs","repos_url":"https://api.github.com/users/continuouspipe/repos","events_url":"https://api.github.com/users/continuouspipe/events{/privacy}","received_events_url":"https://api.github.com/users/continuouspipe/received_events","type":"Organization","site_admin":false},"repo":{"id":71984604,"name":"remote-environment-client","full_name":"continuouspipe/remote-environment-client","owner":{"login":"continuouspipe","id":14802577,"avatar_url":"https://avatars.githubusercontent.com/u/14802577?v=3","gravatar_id":"","url":"https://api.github.com/users/continuouspipe","html_url":"https://github.com/continuouspipe","followers_url":"https://api.github.com/users/continuouspipe/followers","following_url":"https://api.github.com/users/continuouspipe/following{/other_user}","gists_url":"https://api.github.com/users/continuouspipe/gists{/gist_id}","starred_url":"https://api.github.com/users/continuouspipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/continuouspipe/subscriptions","organizations_url":"https://api.github.com/users/continuouspipe/orgs","repos_url":"https://api.github.com/users/continuouspipe/repos","events_url":"https://api.github.com/users/continuouspipe/events{/privacy}","received_events_url":"https://api.github.com/users/continuouspipe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/continuouspipe/remote-environment-client","description":"CLI to manage remote development environments on a Kubernetes cluster","fork":false,"url":"https://api.github.com/repos/continuouspipe/remote-environment-client","forks_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/forks","keys_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/teams","hooks_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/hooks","issue_events_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/issues/events{/number}","events_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/events","assignees_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/assignees{/user}","branches_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/branches{/branch}","tags_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/tags","blobs_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/statuses/{sha}","languages_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/languages","stargazers_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/stargazers","contributors_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/contributors","subscribers_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/subscribers","subscription_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/subscription","commits_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/contents/{+path}","compare_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/merges","archive_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/downloads","issues_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/issues{/number}","pulls_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls{/number}","milestones_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/milestones{/number}","notifications_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/labels{/name}","releases_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/releases{/id}","deployments_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/deployments","created_at":"2016-10-26T08:52:35Z","updated_at":"2016-10-31T11:10:56Z","pushed_at":"2016-11-14T16:50:40Z","git_url":"git://github.com/continuouspipe/remote-environment-client.git","ssh_url":"git@github.com:continuouspipe/remote-environment-client.git","clone_url":"https://github.com/continuouspipe/remote-environment-client.git","svn_url":"https://github.com/continuouspipe/remote-environment-client","homepage":null,"size":123,"stargazers_count":1,"watchers_count":1,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":1,"default_branch":"master"}},"base":{"label":"continuouspipe:master","ref":"master","sha":"1c223184e8fe16b2e99a7cdfb1ada5e6e44a673d","user":{"login":"continuouspipe","id":14802577,"avatar_url":"https://avatars.githubusercontent.com/u/14802577?v=3","gravatar_id":"","url":"https://api.github.com/users/continuouspipe","html_url":"https://github.com/continuouspipe","followers_url":"https://api.github.com/users/continuouspipe/followers","following_url":"https://api.github.com/users/continuouspipe/following{/other_user}","gists_url":"https://api.github.com/users/continuouspipe/gists{/gist_id}","starred_url":"https://api.github.com/users/continuouspipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/continuouspipe/subscriptions","organizations_url":"https://api.github.com/users/continuouspipe/orgs","repos_url":"https://api.github.com/users/continuouspipe/repos","events_url":"https://api.github.com/users/continuouspipe/events{/privacy}","received_events_url":"https://api.github.com/users/continuouspipe/received_events","type":"Organization","site_admin":false},"repo":{"id":71984604,"name":"remote-environment-client","full_name":"continuouspipe/remote-environment-client","owner":{"login":"continuouspipe","id":14802577,"avatar_url":"https://avatars.githubusercontent.com/u/14802577?v=3","gravatar_id":"","url":"https://api.github.com/users/continuouspipe","html_url":"https://github.com/continuouspipe","followers_url":"https://api.github.com/users/continuouspipe/followers","following_url":"https://api.github.com/users/continuouspipe/following{/other_user}","gists_url":"https://api.github.com/users/continuouspipe/gists{/gist_id}","starred_url":"https://api.github.com/users/continuouspipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/continuouspipe/subscriptions","organizations_url":"https://api.github.com/users/continuouspipe/orgs","repos_url":"https://api.github.com/users/continuouspipe/repos","events_url":"https://api.github.com/users/continuouspipe/events{/privacy}","received_events_url":"https://api.github.com/users/continuouspipe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/continuouspipe/remote-environment-client","description":"CLI to manage remote development environments on a Kubernetes cluster","fork":false,"url":"https://api.github.com/repos/continuouspipe/remote-environment-client","forks_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/forks","keys_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/teams","hooks_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/hooks","issue_events_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/issues/events{/number}","events_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/events","assignees_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/assignees{/user}","branches_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/branches{/branch}","tags_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/tags","blobs_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/statuses/{sha}","languages_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/languages","stargazers_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/stargazers","contributors_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/contributors","subscribers_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/subscribers","subscription_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/subscription","commits_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/contents/{+path}","compare_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/merges","archive_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/downloads","issues_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/issues{/number}","pulls_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls{/number}","milestones_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/milestones{/number}","notifications_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/labels{/name}","releases_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/releases{/id}","deployments_url":"https://api.github.com/repos/continuouspipe/remote-environment-client/deployments","created_at":"2016-10-26T08:52:35Z","updated_at":"2016-10-31T11:10:56Z","pushed_at":"2016-11-14T16:50:40Z","git_url":"git://github.com/continuouspipe/remote-environment-client.git","ssh_url":"git@github.com:continuouspipe/remote-environment-client.git","clone_url":"https://github.com/continuouspipe/remote-environment-client.git","svn_url":"https://github.com/continuouspipe/remote-environment-client","homepage":null,"size":123,"stargazers_count":1,"watchers_count":1,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls/35"},"html":{"href":"https://github.com/continuouspipe/remote-environment-client/pull/35"},"issue":{"href":"https://api.github.com/repos/continuouspipe/remote-environment-client/issues/35"},"comments":{"href":"https://api.github.com/repos/continuouspipe/remote-environment-client/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/continuouspipe/remote-environment-client/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/continuouspipe/remote-environment-client/statuses/abddfbf077e5bf5bae8b64705f97baa85090ae2c"}}}}
{"actor":{"display_login":"richardmiller"}}