{"action":"created","comment":{"url":"https://api.github.com/repos/18F/18f.gsa.gov/pulls/comments/24612143","id":24612143,"diff_hunk":"@@ -33,26 +33,46 @@\n home = \"/home/site\"\n log = \"%s/hookshot.log\" % home\n current = \"%s/%s/current\" % (home, environment)\n+ruby = \"/opt/install/rbenv/shims/ruby\"\n \n # principal command to run upon update\n-command = \"cd %s && git pull && bundle exec jekyll build >> %s\" % (current, log)\n+command = \"cd %s && %s go server_build >> %s\" % (current, ruby, log)\n \n ## can be run on their own\n \n def start():\n-  run(\n-    \"cd %s && forever start -l %s -a deploy/hookshot.js -p %i -b %s -c \\\"%s\\\"\"\n-    % (current, log, port, environment, command)\n-  )\n+  with cd(current):\n+    run(\n+      \"forever start -l %s -a deploy/hookshot.js -p %i -b %s -c \\\"%s\\\"\"\n+      % (log, port, environment, command)\n+    )\n \n def stop():\n-  run(\n-    \"cd %s && forever stop deploy/hookshot.js -p %i -b %s -c \\\"%s\\\"\"\n-    % (current, port, environment, command)\n-  )\n+  with cd(current):\n+    run(\n+      \"forever stop deploy/hookshot.js -p %i -b %s -c \\\"%s\\\"\"\n+      % (port, environment, command)\n+    )\n \n def restart():\n-  run(\n-    \"cd %s && forever restart deploy/hookshot.js -p %i -b %s -c \\\"%s\\\"\"\n-    % (current, port, environment, command)\n-  )\n+  with cd(current):\n+    run(\n+      \"forever restart deploy/hookshot.js -p %i -b %s -c \\\"%s\\\"\"\n+      % (port, environment, command)\n+    )\n+\n+def update_data():\n+  with cd(current):\n+    run(\"%s go update_submods\" % (ruby))\n+    run(\"%s go update_data\" % (ruby))\n+\n+def update_submods():\n+  with cd(current):\n+    run(\"%s go update_submods\" % (ruby))\n+\n+def build(scope = 'simple'):\n+  with cd(current):\n+    if scope = 'full'\n+      run(\"%s go server_build\" % (ruby))\n+    elif scope = 'simple'","path":"deploy/fabfile.py","position":null,"original_position":65,"commit_id":"ef1ec3e7e145af7dbb0af5ae690937537085663d","original_commit_id":"33ef713a8388d20e9ef5756264160ebe6f228a1e","user":{"login":"mbland","id":301547,"avatar_url":"https://avatars.githubusercontent.com/u/301547?v=3","gravatar_id":"","url":"https://api.github.com/users/mbland","html_url":"https://github.com/mbland","followers_url":"https://api.github.com/users/mbland/followers","following_url":"https://api.github.com/users/mbland/following{/other_user}","gists_url":"https://api.github.com/users/mbland/gists{/gist_id}","starred_url":"https://api.github.com/users/mbland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbland/subscriptions","organizations_url":"https://api.github.com/users/mbland/orgs","repos_url":"https://api.github.com/users/mbland/repos","events_url":"https://api.github.com/users/mbland/events{/privacy}","received_events_url":"https://api.github.com/users/mbland/received_events","type":"User","site_admin":false},"body":"Not a blocker, but consider this instead:\r\n\r\n```python\r\ndef build(scope = ''):\r\n  with cd(current):\r\n    if scope == 'full':\r\n      run(\"%s go server_build\" % ruby)\r\n    else:\r\n      run('%s go build' % ruby)\r\n```\r\n\r\nNot only does eliminate the extra conditional (which should've been `==`, btw), we eliminate the dreaded `s`-word. :-)","created_at":"2015-02-12T19:33:30Z","updated_at":"2015-02-12T19:33:30Z","html_url":"https://github.com/18F/18f.gsa.gov/pull/510#discussion_r24612143","pull_request_url":"https://api.github.com/repos/18F/18f.gsa.gov/pulls/510","_links":{"self":{"href":"https://api.github.com/repos/18F/18f.gsa.gov/pulls/comments/24612143"},"html":{"href":"https://github.com/18F/18f.gsa.gov/pull/510#discussion_r24612143"},"pull_request":{"href":"https://api.github.com/repos/18F/18f.gsa.gov/pulls/510"}}},"pull_request":{"url":"https://api.github.com/repos/18F/18f.gsa.gov/pulls/510","id":28841717,"html_url":"https://github.com/18F/18f.gsa.gov/pull/510","diff_url":"https://github.com/18F/18f.gsa.gov/pull/510.diff","patch_url":"https://github.com/18F/18f.gsa.gov/pull/510.patch","issue_url":"https://api.github.com/repos/18F/18f.gsa.gov/issues/510","number":510,"state":"open","locked":false,"title":"Fabfile, go, and import-data scripts updated","user":{"login":"gboone","id":312468,"avatar_url":"https://avatars.githubusercontent.com/u/312468?v=3","gravatar_id":"","url":"https://api.github.com/users/gboone","html_url":"https://github.com/gboone","followers_url":"https://api.github.com/users/gboone/followers","following_url":"https://api.github.com/users/gboone/following{/other_user}","gists_url":"https://api.github.com/users/gboone/gists{/gist_id}","starred_url":"https://api.github.com/users/gboone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gboone/subscriptions","organizations_url":"https://api.github.com/users/gboone/orgs","repos_url":"https://api.github.com/users/gboone/repos","events_url":"https://api.github.com/users/gboone/events{/privacy}","received_events_url":"https://api.github.com/users/gboone/received_events","type":"User","site_admin":false},"body":"This PR updates the deployment scripts to take into account the `noexec` setting on the staging/production environments","created_at":"2015-02-06T21:03:21Z","updated_at":"2015-02-12T19:33:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"665782eb5bbfdfd6b0b09109ec717460d46a9615","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/18F/18f.gsa.gov/pulls/510/commits","review_comments_url":"https://api.github.com/repos/18F/18f.gsa.gov/pulls/510/comments","review_comment_url":"https://api.github.com/repos/18F/18f.gsa.gov/pulls/comments/{number}","comments_url":"https://api.github.com/repos/18F/18f.gsa.gov/issues/510/comments","statuses_url":"https://api.github.com/repos/18F/18f.gsa.gov/statuses/ef1ec3e7e145af7dbb0af5ae690937537085663d","head":{"label":"18F:fabfile","ref":"fabfile","sha":"ef1ec3e7e145af7dbb0af5ae690937537085663d","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":17324120,"name":"18f.gsa.gov","full_name":"18F/18f.gsa.gov","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/18f.gsa.gov","description":"18F's main website.","fork":false,"url":"https://api.github.com/repos/18F/18f.gsa.gov","forks_url":"https://api.github.com/repos/18F/18f.gsa.gov/forks","keys_url":"https://api.github.com/repos/18F/18f.gsa.gov/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/18f.gsa.gov/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/18f.gsa.gov/teams","hooks_url":"https://api.github.com/repos/18F/18f.gsa.gov/hooks","issue_events_url":"https://api.github.com/repos/18F/18f.gsa.gov/issues/events{/number}","events_url":"https://api.github.com/repos/18F/18f.gsa.gov/events","assignees_url":"https://api.github.com/repos/18F/18f.gsa.gov/assignees{/user}","branches_url":"https://api.github.com/repos/18F/18f.gsa.gov/branches{/branch}","tags_url":"https://api.github.com/repos/18F/18f.gsa.gov/tags","blobs_url":"https://api.github.com/repos/18F/18f.gsa.gov/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/18f.gsa.gov/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/18f.gsa.gov/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/18f.gsa.gov/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/18f.gsa.gov/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/18f.gsa.gov/languages","stargazers_url":"https://api.github.com/repos/18F/18f.gsa.gov/stargazers","contributors_url":"https://api.github.com/repos/18F/18f.gsa.gov/contributors","subscribers_url":"https://api.github.com/repos/18F/18f.gsa.gov/subscribers","subscription_url":"https://api.github.com/repos/18F/18f.gsa.gov/subscription","commits_url":"https://api.github.com/repos/18F/18f.gsa.gov/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/18f.gsa.gov/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/18f.gsa.gov/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/18f.gsa.gov/issues/comments/{number}","contents_url":"https://api.github.com/repos/18F/18f.gsa.gov/contents/{+path}","compare_url":"https://api.github.com/repos/18F/18f.gsa.gov/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/18f.gsa.gov/merges","archive_url":"https://api.github.com/repos/18F/18f.gsa.gov/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/18f.gsa.gov/downloads","issues_url":"https://api.github.com/repos/18F/18f.gsa.gov/issues{/number}","pulls_url":"https://api.github.com/repos/18F/18f.gsa.gov/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/18f.gsa.gov/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/18f.gsa.gov/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/18f.gsa.gov/labels{/name}","releases_url":"https://api.github.com/repos/18F/18f.gsa.gov/releases{/id}","created_at":"2014-03-01T20:57:14Z","updated_at":"2015-02-11T16:19:39Z","pushed_at":"2015-02-12T19:32:00Z","git_url":"git://github.com/18F/18f.gsa.gov.git","ssh_url":"git@github.com:18F/18f.gsa.gov.git","clone_url":"https://github.com/18F/18f.gsa.gov.git","svn_url":"https://github.com/18F/18f.gsa.gov","homepage":"https://18f.gsa.gov","size":39812,"stargazers_count":41,"watchers_count":41,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":46,"forks":47,"open_issues":46,"watchers":41,"default_branch":"staging"}},"base":{"label":"18F:staging","ref":"staging","sha":"797843a36a729dfb8399dc8f107f1b30836ba97b","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":17324120,"name":"18f.gsa.gov","full_name":"18F/18f.gsa.gov","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/18f.gsa.gov","description":"18F's main website.","fork":false,"url":"https://api.github.com/repos/18F/18f.gsa.gov","forks_url":"https://api.github.com/repos/18F/18f.gsa.gov/forks","keys_url":"https://api.github.com/repos/18F/18f.gsa.gov/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/18f.gsa.gov/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/18f.gsa.gov/teams","hooks_url":"https://api.github.com/repos/18F/18f.gsa.gov/hooks","issue_events_url":"https://api.github.com/repos/18F/18f.gsa.gov/issues/events{/number}","events_url":"https://api.github.com/repos/18F/18f.gsa.gov/events","assignees_url":"https://api.github.com/repos/18F/18f.gsa.gov/assignees{/user}","branches_url":"https://api.github.com/repos/18F/18f.gsa.gov/branches{/branch}","tags_url":"https://api.github.com/repos/18F/18f.gsa.gov/tags","blobs_url":"https://api.github.com/repos/18F/18f.gsa.gov/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/18f.gsa.gov/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/18f.gsa.gov/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/18f.gsa.gov/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/18f.gsa.gov/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/18f.gsa.gov/languages","stargazers_url":"https://api.github.com/repos/18F/18f.gsa.gov/stargazers","contributors_url":"https://api.github.com/repos/18F/18f.gsa.gov/contributors","subscribers_url":"https://api.github.com/repos/18F/18f.gsa.gov/subscribers","subscription_url":"https://api.github.com/repos/18F/18f.gsa.gov/subscription","commits_url":"https://api.github.com/repos/18F/18f.gsa.gov/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/18f.gsa.gov/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/18f.gsa.gov/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/18f.gsa.gov/issues/comments/{number}","contents_url":"https://api.github.com/repos/18F/18f.gsa.gov/contents/{+path}","compare_url":"https://api.github.com/repos/18F/18f.gsa.gov/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/18f.gsa.gov/merges","archive_url":"https://api.github.com/repos/18F/18f.gsa.gov/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/18f.gsa.gov/downloads","issues_url":"https://api.github.com/repos/18F/18f.gsa.gov/issues{/number}","pulls_url":"https://api.github.com/repos/18F/18f.gsa.gov/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/18f.gsa.gov/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/18f.gsa.gov/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/18f.gsa.gov/labels{/name}","releases_url":"https://api.github.com/repos/18F/18f.gsa.gov/releases{/id}","created_at":"2014-03-01T20:57:14Z","updated_at":"2015-02-11T16:19:39Z","pushed_at":"2015-02-12T19:32:00Z","git_url":"git://github.com/18F/18f.gsa.gov.git","ssh_url":"git@github.com:18F/18f.gsa.gov.git","clone_url":"https://github.com/18F/18f.gsa.gov.git","svn_url":"https://github.com/18F/18f.gsa.gov","homepage":"https://18f.gsa.gov","size":39812,"stargazers_count":41,"watchers_count":41,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":46,"forks":47,"open_issues":46,"watchers":41,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/18f.gsa.gov/pulls/510"},"html":{"href":"https://github.com/18F/18f.gsa.gov/pull/510"},"issue":{"href":"https://api.github.com/repos/18F/18f.gsa.gov/issues/510"},"comments":{"href":"https://api.github.com/repos/18F/18f.gsa.gov/issues/510/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/18f.gsa.gov/pulls/510/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/18f.gsa.gov/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/18F/18f.gsa.gov/pulls/510/commits"},"statuses":{"href":"https://api.github.com/repos/18F/18f.gsa.gov/statuses/ef1ec3e7e145af7dbb0af5ae690937537085663d"}}}}