{"action":"created","comment":{"url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/comments/66864851","id":66864851,"diff_hunk":"@@ -31,9 +31,15 @@ var Uploader = function () {\n   this.secrets = new Secrets();\n   this.secrets.load();\n   this.s3 = new AWS.S3();\n+  this.tag = this.getPkgVersion();\n   this.distAssets = fs.readdirSync(DIST_DIR);\n };\n \n+Uploader.prototype.getPkgVersion = function () {\n+  var pkg = fs.readFileSync('./package.json')","path":"scripts/deploy","position":9,"original_position":9,"commit_id":"59e7eb629dc7ebf7c4db6c13e4d6a996ccf43877","original_commit_id":"59e7eb629dc7ebf7c4db6c13e4d6a996ccf43877","user":{"login":"minasmart","id":568174,"avatar_url":"https://avatars.githubusercontent.com/u/568174?v=3","gravatar_id":"","url":"https://api.github.com/users/minasmart","html_url":"https://github.com/minasmart","followers_url":"https://api.github.com/users/minasmart/followers","following_url":"https://api.github.com/users/minasmart/following{/other_user}","gists_url":"https://api.github.com/users/minasmart/gists{/gist_id}","starred_url":"https://api.github.com/users/minasmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minasmart/subscriptions","organizations_url":"https://api.github.com/users/minasmart/orgs","repos_url":"https://api.github.com/users/minasmart/repos","events_url":"https://api.github.com/users/minasmart/events{/privacy}","received_events_url":"https://api.github.com/users/minasmart/received_events","type":"User","site_admin":false},"body":"You can actually do `require('./package.json')` I think. Which will remove the need to manually parse json on the next line.","created_at":"2016-06-13T20:48:38Z","updated_at":"2016-06-13T20:48:38Z","html_url":"https://github.com/Shopify/js-buy-sdk/pull/140#discussion_r66864851","pull_request_url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/140","_links":{"self":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/comments/66864851"},"html":{"href":"https://github.com/Shopify/js-buy-sdk/pull/140#discussion_r66864851"},"pull_request":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/140"}}},"pull_request":{"url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/140","id":73640418,"html_url":"https://github.com/Shopify/js-buy-sdk/pull/140","diff_url":"https://github.com/Shopify/js-buy-sdk/pull/140.diff","patch_url":"https://github.com/Shopify/js-buy-sdk/pull/140.patch","issue_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/140","number":140,"state":"open","locked":false,"title":"read version from package.json","user":{"login":"tessalt","id":1789029,"avatar_url":"https://avatars.githubusercontent.com/u/1789029?v=3","gravatar_id":"","url":"https://api.github.com/users/tessalt","html_url":"https://github.com/tessalt","followers_url":"https://api.github.com/users/tessalt/followers","following_url":"https://api.github.com/users/tessalt/following{/other_user}","gists_url":"https://api.github.com/users/tessalt/gists{/gist_id}","starred_url":"https://api.github.com/users/tessalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tessalt/subscriptions","organizations_url":"https://api.github.com/users/tessalt/orgs","repos_url":"https://api.github.com/users/tessalt/repos","events_url":"https://api.github.com/users/tessalt/events{/privacy}","received_events_url":"https://api.github.com/users/tessalt/received_events","type":"User","site_admin":false},"body":"rather than calling `exec` to get git tag, get version number for cdn scripts from package.json. I think this is a better approach but I'm also slightly suspicious about what my original motives were for not doing this the first time around. @minasmart @yomexzo @richgilbank ","created_at":"2016-06-13T20:46:37Z","updated_at":"2016-06-13T20:48:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be00bc4d3e0371631a92c3656a57ada2ce438c35","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/140/commits","review_comments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/140/comments","review_comment_url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/140/comments","statuses_url":"https://api.github.com/repos/Shopify/js-buy-sdk/statuses/59e7eb629dc7ebf7c4db6c13e4d6a996ccf43877","head":{"label":"Shopify:fix-deploys","ref":"fix-deploys","sha":"59e7eb629dc7ebf7c4db6c13e4d6a996ccf43877","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":49018115,"name":"js-buy-sdk","full_name":"Shopify/js-buy-sdk","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/js-buy-sdk","description":"The JS Buy SDK is a lightweight library that allows you to build ecommerce into any website. It is based on Shopify's API and provides the ability to retrieve products and collections from your shop, add products to a cart, and checkout.","fork":false,"url":"https://api.github.com/repos/Shopify/js-buy-sdk","forks_url":"https://api.github.com/repos/Shopify/js-buy-sdk/forks","keys_url":"https://api.github.com/repos/Shopify/js-buy-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/js-buy-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/js-buy-sdk/teams","hooks_url":"https://api.github.com/repos/Shopify/js-buy-sdk/hooks","issue_events_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/js-buy-sdk/events","assignees_url":"https://api.github.com/repos/Shopify/js-buy-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/js-buy-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/js-buy-sdk/tags","blobs_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/js-buy-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/js-buy-sdk/languages","stargazers_url":"https://api.github.com/repos/Shopify/js-buy-sdk/stargazers","contributors_url":"https://api.github.com/repos/Shopify/js-buy-sdk/contributors","subscribers_url":"https://api.github.com/repos/Shopify/js-buy-sdk/subscribers","subscription_url":"https://api.github.com/repos/Shopify/js-buy-sdk/subscription","commits_url":"https://api.github.com/repos/Shopify/js-buy-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/js-buy-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/js-buy-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/js-buy-sdk/merges","archive_url":"https://api.github.com/repos/Shopify/js-buy-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/js-buy-sdk/downloads","issues_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/js-buy-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/js-buy-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/js-buy-sdk/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/js-buy-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/deployments","created_at":"2016-01-04T19:26:34Z","updated_at":"2016-06-13T05:38:05Z","pushed_at":"2016-06-13T20:46:37Z","git_url":"git://github.com/Shopify/js-buy-sdk.git","ssh_url":"git@github.com:Shopify/js-buy-sdk.git","clone_url":"https://github.com/Shopify/js-buy-sdk.git","svn_url":"https://github.com/Shopify/js-buy-sdk","homepage":"https://shopify.github.io/js-buy-sdk","size":1017,"stargazers_count":106,"watchers_count":106,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":22,"forks":11,"open_issues":22,"watchers":106,"default_branch":"master"}},"base":{"label":"Shopify:master","ref":"master","sha":"ca1d2cd6b2cc66dc5a73f4518f1177f3cf8b9a23","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":49018115,"name":"js-buy-sdk","full_name":"Shopify/js-buy-sdk","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/js-buy-sdk","description":"The JS Buy SDK is a lightweight library that allows you to build ecommerce into any website. It is based on Shopify's API and provides the ability to retrieve products and collections from your shop, add products to a cart, and checkout.","fork":false,"url":"https://api.github.com/repos/Shopify/js-buy-sdk","forks_url":"https://api.github.com/repos/Shopify/js-buy-sdk/forks","keys_url":"https://api.github.com/repos/Shopify/js-buy-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/js-buy-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/js-buy-sdk/teams","hooks_url":"https://api.github.com/repos/Shopify/js-buy-sdk/hooks","issue_events_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/js-buy-sdk/events","assignees_url":"https://api.github.com/repos/Shopify/js-buy-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/js-buy-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/js-buy-sdk/tags","blobs_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/js-buy-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/js-buy-sdk/languages","stargazers_url":"https://api.github.com/repos/Shopify/js-buy-sdk/stargazers","contributors_url":"https://api.github.com/repos/Shopify/js-buy-sdk/contributors","subscribers_url":"https://api.github.com/repos/Shopify/js-buy-sdk/subscribers","subscription_url":"https://api.github.com/repos/Shopify/js-buy-sdk/subscription","commits_url":"https://api.github.com/repos/Shopify/js-buy-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/js-buy-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/js-buy-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/js-buy-sdk/merges","archive_url":"https://api.github.com/repos/Shopify/js-buy-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/js-buy-sdk/downloads","issues_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/js-buy-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/js-buy-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/js-buy-sdk/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/js-buy-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/deployments","created_at":"2016-01-04T19:26:34Z","updated_at":"2016-06-13T05:38:05Z","pushed_at":"2016-06-13T20:46:37Z","git_url":"git://github.com/Shopify/js-buy-sdk.git","ssh_url":"git@github.com:Shopify/js-buy-sdk.git","clone_url":"https://github.com/Shopify/js-buy-sdk.git","svn_url":"https://github.com/Shopify/js-buy-sdk","homepage":"https://shopify.github.io/js-buy-sdk","size":1017,"stargazers_count":106,"watchers_count":106,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":22,"forks":11,"open_issues":22,"watchers":106,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/140"},"html":{"href":"https://github.com/Shopify/js-buy-sdk/pull/140"},"issue":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/140"},"comments":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/140/comments"},"review_comments":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/140/comments"},"review_comment":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/140/commits"},"statuses":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/statuses/59e7eb629dc7ebf7c4db6c13e4d6a996ccf43877"}}}}
{"actor":{"display_login":"minasmart"}}