{"action":"created","comment":{"url":"https://api.github.com/repos/resin-io/etcher/pulls/comments/90910242","pull_request_review_id":11423732,"id":90910242,"diff_hunk":"@@ -88,21 +88,22 @@ APPLICATION_VERSION_DEBIAN = $(shell echo $(APPLICATION_VERSION) | tr \"-\" \"~\")\n # Rules\n # ---------------------------------------------------------------------\n \n-release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app:\n-\t./scripts/unix/electron-create-resources-app.sh -s . -f \"$(APPLICATION_FILES)\" -o $@\n+release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-dependencies/node_modules: package.json npm-shrinkwrap.json\n+\t./scripts/unix/dependencies-npm.sh -p -r \"$(TARGET_ARCH)\" -v \"$(ELECTRON_VERSION)\" -x $(dir $@) -t electron\n \n-release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app/node_modules:\\\n-\trelease/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app\n-\t./scripts/unix/dependencies-npm.sh -p -r \"$(TARGET_ARCH)\" -v \"$(ELECTRON_VERSION)\" -x $< -t electron\n+release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-dependencies/bower_components: bower.json\n+\t./scripts/unix/dependencies-bower.sh -p -x $(dir $@)\n \n-release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app/bower_components:\\\n-\trelease/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app\n-\t./scripts/unix/dependencies-bower.sh -p -x $<\n+release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-app: \\\n+\trelease/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-dependencies/node_modules \\","path":"Makefile","position":19,"original_position":19,"commit_id":"b0a0c620e14fd01bbc21017599d90d10815a35bd","original_commit_id":"b0a0c620e14fd01bbc21017599d90d10815a35bd","user":{"login":"lurch","id":476186,"avatar_url":"https://avatars.githubusercontent.com/u/476186?v=3","gravatar_id":"","url":"https://api.github.com/users/lurch","html_url":"https://github.com/lurch","followers_url":"https://api.github.com/users/lurch/followers","following_url":"https://api.github.com/users/lurch/following{/other_user}","gists_url":"https://api.github.com/users/lurch/gists{/gist_id}","starred_url":"https://api.github.com/users/lurch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lurch/subscriptions","organizations_url":"https://api.github.com/users/lurch/orgs","repos_url":"https://api.github.com/users/lurch/repos","events_url":"https://api.github.com/users/lurch/events{/privacy}","received_events_url":"https://api.github.com/users/lurch/received_events","type":"User","site_admin":false},"body":"The nice thing about having the `mkdir` commands in the `Makfefile`, is that `make` can see if the directory already exists, and so skip running the `mkdir` in the first place. It's also nice to have a central place where all the directories are created, rather than having different `mkdir` commands scattered amongst different Bash scripts? (chances are we have multiple scripts each creating the same directories?)","created_at":"2016-12-05T17:09:51Z","updated_at":"2016-12-05T17:09:51Z","html_url":"https://github.com/resin-io/etcher/pull/923#discussion_r90910242","pull_request_url":"https://api.github.com/repos/resin-io/etcher/pulls/923","_links":{"self":{"href":"https://api.github.com/repos/resin-io/etcher/pulls/comments/90910242"},"html":{"href":"https://github.com/resin-io/etcher/pull/923#discussion_r90910242"},"pull_request":{"href":"https://api.github.com/repos/resin-io/etcher/pulls/923"}}},"pull_request":{"url":"https://api.github.com/repos/resin-io/etcher/pulls/923","id":96152503,"html_url":"https://github.com/resin-io/etcher/pull/923","diff_url":"https://github.com/resin-io/etcher/pull/923.diff","patch_url":"https://github.com/resin-io/etcher/pull/923.patch","issue_url":"https://api.github.com/repos/resin-io/etcher/issues/923","number":923,"state":"closed","locked":false,"title":"chore: reuse npm/bower dependencies across builds","user":{"login":"jviotti","id":2192773,"avatar_url":"https://avatars.githubusercontent.com/u/2192773?v=3","gravatar_id":"","url":"https://api.github.com/users/jviotti","html_url":"https://github.com/jviotti","followers_url":"https://api.github.com/users/jviotti/followers","following_url":"https://api.github.com/users/jviotti/following{/other_user}","gists_url":"https://api.github.com/users/jviotti/gists{/gist_id}","starred_url":"https://api.github.com/users/jviotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jviotti/subscriptions","organizations_url":"https://api.github.com/users/jviotti/orgs","repos_url":"https://api.github.com/users/jviotti/repos","events_url":"https://api.github.com/users/jviotti/events{/privacy}","received_events_url":"https://api.github.com/users/jviotti/received_events","type":"User","site_admin":false},"body":"Currently, we create a \"resources app\" and install dependencies on it.\nThis means that to create another \"resources app\", the whole dependency\ninstallation process needs to be repeated.\n\nAs a solution, we cache dependencies at\n`release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-dependencies/` and\ncopy them to the resources apps as we need them.\n\nThis has the additional benefit that the resources app depends on the\ndependencies rather than the other way around (dependencies depend on\nthe resources app), which didn't feel right.\n\nIn order to accomodate to these changes, the dependencies scripts are\nnow in charge of taking their corresponding manifests with them when the\nprefix option is passed, given that neither `npm` nor `bower` allow to\ncustomise the output location.\n\nSigned-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>","created_at":"2016-12-01T19:21:00Z","updated_at":"2016-12-05T17:09:51Z","closed_at":"2016-12-01T23:52:08Z","merged_at":"2016-12-01T23:52:08Z","merge_commit_sha":"832bfad9d12a46ee41b87ccff90f701e85ade57b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/resin-io/etcher/pulls/923/commits","review_comments_url":"https://api.github.com/repos/resin-io/etcher/pulls/923/comments","review_comment_url":"https://api.github.com/repos/resin-io/etcher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/resin-io/etcher/issues/923/comments","statuses_url":"https://api.github.com/repos/resin-io/etcher/statuses/b0a0c620e14fd01bbc21017599d90d10815a35bd","head":{"label":"resin-io:reusable-dependencies-makefile","ref":"reusable-dependencies-makefile","sha":"b0a0c620e14fd01bbc21017599d90d10815a35bd","user":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"repo":{"id":45055693,"name":"etcher","full_name":"resin-io/etcher","owner":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resin-io/etcher","description":"Flash OS images to SD cards & USB drives, safely and easily.","fork":false,"url":"https://api.github.com/repos/resin-io/etcher","forks_url":"https://api.github.com/repos/resin-io/etcher/forks","keys_url":"https://api.github.com/repos/resin-io/etcher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resin-io/etcher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resin-io/etcher/teams","hooks_url":"https://api.github.com/repos/resin-io/etcher/hooks","issue_events_url":"https://api.github.com/repos/resin-io/etcher/issues/events{/number}","events_url":"https://api.github.com/repos/resin-io/etcher/events","assignees_url":"https://api.github.com/repos/resin-io/etcher/assignees{/user}","branches_url":"https://api.github.com/repos/resin-io/etcher/branches{/branch}","tags_url":"https://api.github.com/repos/resin-io/etcher/tags","blobs_url":"https://api.github.com/repos/resin-io/etcher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resin-io/etcher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resin-io/etcher/git/refs{/sha}","trees_url":"https://api.github.com/repos/resin-io/etcher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resin-io/etcher/statuses/{sha}","languages_url":"https://api.github.com/repos/resin-io/etcher/languages","stargazers_url":"https://api.github.com/repos/resin-io/etcher/stargazers","contributors_url":"https://api.github.com/repos/resin-io/etcher/contributors","subscribers_url":"https://api.github.com/repos/resin-io/etcher/subscribers","subscription_url":"https://api.github.com/repos/resin-io/etcher/subscription","commits_url":"https://api.github.com/repos/resin-io/etcher/commits{/sha}","git_commits_url":"https://api.github.com/repos/resin-io/etcher/git/commits{/sha}","comments_url":"https://api.github.com/repos/resin-io/etcher/comments{/number}","issue_comment_url":"https://api.github.com/repos/resin-io/etcher/issues/comments{/number}","contents_url":"https://api.github.com/repos/resin-io/etcher/contents/{+path}","compare_url":"https://api.github.com/repos/resin-io/etcher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resin-io/etcher/merges","archive_url":"https://api.github.com/repos/resin-io/etcher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resin-io/etcher/downloads","issues_url":"https://api.github.com/repos/resin-io/etcher/issues{/number}","pulls_url":"https://api.github.com/repos/resin-io/etcher/pulls{/number}","milestones_url":"https://api.github.com/repos/resin-io/etcher/milestones{/number}","notifications_url":"https://api.github.com/repos/resin-io/etcher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resin-io/etcher/labels{/name}","releases_url":"https://api.github.com/repos/resin-io/etcher/releases{/id}","deployments_url":"https://api.github.com/repos/resin-io/etcher/deployments","created_at":"2015-10-27T16:53:23Z","updated_at":"2016-12-05T16:40:48Z","pushed_at":"2016-12-05T17:09:29Z","git_url":"git://github.com/resin-io/etcher.git","ssh_url":"git@github.com:resin-io/etcher.git","clone_url":"https://github.com/resin-io/etcher.git","svn_url":"https://github.com/resin-io/etcher","homepage":"https://etcher.io","size":12028,"stargazers_count":1406,"watchers_count":1406,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":70,"forks":81,"open_issues":70,"watchers":1406,"default_branch":"master"}},"base":{"label":"resin-io:master","ref":"master","sha":"68a71d89e2053db750216ae9e13a076d489a0e25","user":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"repo":{"id":45055693,"name":"etcher","full_name":"resin-io/etcher","owner":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resin-io/etcher","description":"Flash OS images to SD cards & USB drives, safely and easily.","fork":false,"url":"https://api.github.com/repos/resin-io/etcher","forks_url":"https://api.github.com/repos/resin-io/etcher/forks","keys_url":"https://api.github.com/repos/resin-io/etcher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resin-io/etcher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resin-io/etcher/teams","hooks_url":"https://api.github.com/repos/resin-io/etcher/hooks","issue_events_url":"https://api.github.com/repos/resin-io/etcher/issues/events{/number}","events_url":"https://api.github.com/repos/resin-io/etcher/events","assignees_url":"https://api.github.com/repos/resin-io/etcher/assignees{/user}","branches_url":"https://api.github.com/repos/resin-io/etcher/branches{/branch}","tags_url":"https://api.github.com/repos/resin-io/etcher/tags","blobs_url":"https://api.github.com/repos/resin-io/etcher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resin-io/etcher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resin-io/etcher/git/refs{/sha}","trees_url":"https://api.github.com/repos/resin-io/etcher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resin-io/etcher/statuses/{sha}","languages_url":"https://api.github.com/repos/resin-io/etcher/languages","stargazers_url":"https://api.github.com/repos/resin-io/etcher/stargazers","contributors_url":"https://api.github.com/repos/resin-io/etcher/contributors","subscribers_url":"https://api.github.com/repos/resin-io/etcher/subscribers","subscription_url":"https://api.github.com/repos/resin-io/etcher/subscription","commits_url":"https://api.github.com/repos/resin-io/etcher/commits{/sha}","git_commits_url":"https://api.github.com/repos/resin-io/etcher/git/commits{/sha}","comments_url":"https://api.github.com/repos/resin-io/etcher/comments{/number}","issue_comment_url":"https://api.github.com/repos/resin-io/etcher/issues/comments{/number}","contents_url":"https://api.github.com/repos/resin-io/etcher/contents/{+path}","compare_url":"https://api.github.com/repos/resin-io/etcher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resin-io/etcher/merges","archive_url":"https://api.github.com/repos/resin-io/etcher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resin-io/etcher/downloads","issues_url":"https://api.github.com/repos/resin-io/etcher/issues{/number}","pulls_url":"https://api.github.com/repos/resin-io/etcher/pulls{/number}","milestones_url":"https://api.github.com/repos/resin-io/etcher/milestones{/number}","notifications_url":"https://api.github.com/repos/resin-io/etcher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resin-io/etcher/labels{/name}","releases_url":"https://api.github.com/repos/resin-io/etcher/releases{/id}","deployments_url":"https://api.github.com/repos/resin-io/etcher/deployments","created_at":"2015-10-27T16:53:23Z","updated_at":"2016-12-05T16:40:48Z","pushed_at":"2016-12-05T17:09:29Z","git_url":"git://github.com/resin-io/etcher.git","ssh_url":"git@github.com:resin-io/etcher.git","clone_url":"https://github.com/resin-io/etcher.git","svn_url":"https://github.com/resin-io/etcher","homepage":"https://etcher.io","size":12028,"stargazers_count":1406,"watchers_count":1406,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":70,"forks":81,"open_issues":70,"watchers":1406,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/resin-io/etcher/pulls/923"},"html":{"href":"https://github.com/resin-io/etcher/pull/923"},"issue":{"href":"https://api.github.com/repos/resin-io/etcher/issues/923"},"comments":{"href":"https://api.github.com/repos/resin-io/etcher/issues/923/comments"},"review_comments":{"href":"https://api.github.com/repos/resin-io/etcher/pulls/923/comments"},"review_comment":{"href":"https://api.github.com/repos/resin-io/etcher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/resin-io/etcher/pulls/923/commits"},"statuses":{"href":"https://api.github.com/repos/resin-io/etcher/statuses/b0a0c620e14fd01bbc21017599d90d10815a35bd"}}}}
{"actor":{"display_login":"lurch"}}