{"action":"created","comment":{"url":"https://api.github.com/repos/kolide/launcher/pulls/comments/208062215","pull_request_review_id":143798664,"id":208062215,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODA2MjIxNQ==","diff_hunk":"@@ -784,6 +838,38 @@ func pkgbuild(packageRoot, scriptsRoot, identifier, version, macPackageSigningKe\n \treturn nil\n }\n \n+// distributionTemplateOptions is a struct which contains dynamic distribution\n+// file parameters that will be rendered into a template.\n+type distributionTemplateOptions struct {\n+\tPackageVersion    string\n+\tPackageFileName   string\n+}\n+\n+// renderDistributionFile renders a distribution file to add to launcher's template.\n+func renderDistributionFile(w io.Writer, options *distributionTemplateOptions) error {\n+\tdistributionTemplate :=\n+\t\t`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n+<installer-gui-script minSpecVersion=\"1\">\n+    <pkg-ref id=\"com.launcher.launcher\"/>\n+    <options customize=\"never\" require-scripts=\"false\"/>\n+    <choices-outline>\n+        <line choice=\"default\">\n+            <line choice=\"com.launcher.launcher\"/>\n+        </line>\n+    </choices-outline>\n+    <choice id=\"default\"/>\n+    <choice id=\"com.launcher.launcher\" visible=\"false\">\n+        <pkg-ref id=\"com.launcher.launcher\"/>","path":"pkg/packaging/packaging.go","position":108,"original_position":108,"commit_id":"09c5cba9fdb97539baeceef0874d5252d507ed35","original_commit_id":"09c5cba9fdb97539baeceef0874d5252d507ed35","user":{"login":"marpaia","id":927168,"node_id":"MDQ6VXNlcjkyNzE2OA==","avatar_url":"https://avatars2.githubusercontent.com/u/927168?v=4","gravatar_id":"","url":"https://api.github.com/users/marpaia","html_url":"https://github.com/marpaia","followers_url":"https://api.github.com/users/marpaia/followers","following_url":"https://api.github.com/users/marpaia/following{/other_user}","gists_url":"https://api.github.com/users/marpaia/gists{/gist_id}","starred_url":"https://api.github.com/users/marpaia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marpaia/subscriptions","organizations_url":"https://api.github.com/users/marpaia/orgs","repos_url":"https://api.github.com/users/marpaia/repos","events_url":"https://api.github.com/users/marpaia/events{/privacy}","received_events_url":"https://api.github.com/users/marpaia/received_events","type":"User","site_admin":false},"body":"This should be parameterized with the `identifier` option so that it's `com.{{.Identifier}}.launcher`","created_at":"2018-08-06T23:56:48Z","updated_at":"2018-08-06T23:59:00Z","html_url":"https://github.com/kolide/launcher/pull/338#discussion_r208062215","pull_request_url":"https://api.github.com/repos/kolide/launcher/pulls/338","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kolide/launcher/pulls/comments/208062215"},"html":{"href":"https://github.com/kolide/launcher/pull/338#discussion_r208062215"},"pull_request":{"href":"https://api.github.com/repos/kolide/launcher/pulls/338"}}},"pull_request":{"url":"https://api.github.com/repos/kolide/launcher/pulls/338","id":206525828,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2NTI1ODI4","html_url":"https://github.com/kolide/launcher/pull/338","diff_url":"https://github.com/kolide/launcher/pull/338.diff","patch_url":"https://github.com/kolide/launcher/pull/338.patch","issue_url":"https://api.github.com/repos/kolide/launcher/issues/338","number":338,"state":"open","locked":false,"title":"Fix - MacOS distribution package","user":{"login":"m6a-UdS","id":6933233,"node_id":"MDQ6VXNlcjY5MzMyMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/6933233?v=4","gravatar_id":"","url":"https://api.github.com/users/m6a-UdS","html_url":"https://github.com/m6a-UdS","followers_url":"https://api.github.com/users/m6a-UdS/followers","following_url":"https://api.github.com/users/m6a-UdS/following{/other_user}","gists_url":"https://api.github.com/users/m6a-UdS/gists{/gist_id}","starred_url":"https://api.github.com/users/m6a-UdS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m6a-UdS/subscriptions","organizations_url":"https://api.github.com/users/m6a-UdS/orgs","repos_url":"https://api.github.com/users/m6a-UdS/repos","events_url":"https://api.github.com/users/m6a-UdS/events{/privacy}","received_events_url":"https://api.github.com/users/m6a-UdS/received_events","type":"User","site_admin":false},"body":"Some MDMs (like SimpleMDM) require the OSX package (`.pkg`) to contain a \"distribution\" file, and therefore require the command `productbuild` to be run after `pkgbuild` in order for the package to be accepted by SimpleMDM.\r\n\r\nI was unsure whether it would be better to output both versions (with and without the distribution file), the choice is done at the line 553, but could be modified to include both.\r\n\r\nI can confirm it works and gets distributed and installed fine with SimpleMDM, but it would be a good idea to also check with other MDMs.","created_at":"2018-08-06T21:48:27Z","updated_at":"2018-08-06T23:59:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2f5c941ab03f945b6024db67aedef05b8d83e0c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kolide/launcher/pulls/338/commits","review_comments_url":"https://api.github.com/repos/kolide/launcher/pulls/338/comments","review_comment_url":"https://api.github.com/repos/kolide/launcher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kolide/launcher/issues/338/comments","statuses_url":"https://api.github.com/repos/kolide/launcher/statuses/09c5cba9fdb97539baeceef0874d5252d507ed35","head":{"label":"PokaInc:fix/mac-distribution-package","ref":"fix/mac-distribution-package","sha":"09c5cba9fdb97539baeceef0874d5252d507ed35","user":{"login":"PokaInc","id":10982903,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTgyOTAz","avatar_url":"https://avatars3.githubusercontent.com/u/10982903?v=4","gravatar_id":"","url":"https://api.github.com/users/PokaInc","html_url":"https://github.com/PokaInc","followers_url":"https://api.github.com/users/PokaInc/followers","following_url":"https://api.github.com/users/PokaInc/following{/other_user}","gists_url":"https://api.github.com/users/PokaInc/gists{/gist_id}","starred_url":"https://api.github.com/users/PokaInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PokaInc/subscriptions","organizations_url":"https://api.github.com/users/PokaInc/orgs","repos_url":"https://api.github.com/users/PokaInc/repos","events_url":"https://api.github.com/users/PokaInc/events{/privacy}","received_events_url":"https://api.github.com/users/PokaInc/received_events","type":"Organization","site_admin":false},"repo":{"id":143764361,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM3NjQzNjE=","name":"launcher","full_name":"PokaInc/launcher","owner":{"login":"PokaInc","id":10982903,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTgyOTAz","avatar_url":"https://avatars3.githubusercontent.com/u/10982903?v=4","gravatar_id":"","url":"https://api.github.com/users/PokaInc","html_url":"https://github.com/PokaInc","followers_url":"https://api.github.com/users/PokaInc/followers","following_url":"https://api.github.com/users/PokaInc/following{/other_user}","gists_url":"https://api.github.com/users/PokaInc/gists{/gist_id}","starred_url":"https://api.github.com/users/PokaInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PokaInc/subscriptions","organizations_url":"https://api.github.com/users/PokaInc/orgs","repos_url":"https://api.github.com/users/PokaInc/repos","events_url":"https://api.github.com/users/PokaInc/events{/privacy}","received_events_url":"https://api.github.com/users/PokaInc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PokaInc/launcher","description":"Osquery launcher, autoupdater, and packager","fork":true,"url":"https://api.github.com/repos/PokaInc/launcher","forks_url":"https://api.github.com/repos/PokaInc/launcher/forks","keys_url":"https://api.github.com/repos/PokaInc/launcher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PokaInc/launcher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PokaInc/launcher/teams","hooks_url":"https://api.github.com/repos/PokaInc/launcher/hooks","issue_events_url":"https://api.github.com/repos/PokaInc/launcher/issues/events{/number}","events_url":"https://api.github.com/repos/PokaInc/launcher/events","assignees_url":"https://api.github.com/repos/PokaInc/launcher/assignees{/user}","branches_url":"https://api.github.com/repos/PokaInc/launcher/branches{/branch}","tags_url":"https://api.github.com/repos/PokaInc/launcher/tags","blobs_url":"https://api.github.com/repos/PokaInc/launcher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PokaInc/launcher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PokaInc/launcher/git/refs{/sha}","trees_url":"https://api.github.com/repos/PokaInc/launcher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PokaInc/launcher/statuses/{sha}","languages_url":"https://api.github.com/repos/PokaInc/launcher/languages","stargazers_url":"https://api.github.com/repos/PokaInc/launcher/stargazers","contributors_url":"https://api.github.com/repos/PokaInc/launcher/contributors","subscribers_url":"https://api.github.com/repos/PokaInc/launcher/subscribers","subscription_url":"https://api.github.com/repos/PokaInc/launcher/subscription","commits_url":"https://api.github.com/repos/PokaInc/launcher/commits{/sha}","git_commits_url":"https://api.github.com/repos/PokaInc/launcher/git/commits{/sha}","comments_url":"https://api.github.com/repos/PokaInc/launcher/comments{/number}","issue_comment_url":"https://api.github.com/repos/PokaInc/launcher/issues/comments{/number}","contents_url":"https://api.github.com/repos/PokaInc/launcher/contents/{+path}","compare_url":"https://api.github.com/repos/PokaInc/launcher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PokaInc/launcher/merges","archive_url":"https://api.github.com/repos/PokaInc/launcher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PokaInc/launcher/downloads","issues_url":"https://api.github.com/repos/PokaInc/launcher/issues{/number}","pulls_url":"https://api.github.com/repos/PokaInc/launcher/pulls{/number}","milestones_url":"https://api.github.com/repos/PokaInc/launcher/milestones{/number}","notifications_url":"https://api.github.com/repos/PokaInc/launcher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PokaInc/launcher/labels{/name}","releases_url":"https://api.github.com/repos/PokaInc/launcher/releases{/id}","deployments_url":"https://api.github.com/repos/PokaInc/launcher/deployments","created_at":"2018-08-06T17:59:55Z","updated_at":"2018-08-06T17:59:57Z","pushed_at":"2018-08-06T21:43:40Z","git_url":"git://github.com/PokaInc/launcher.git","ssh_url":"git@github.com:PokaInc/launcher.git","clone_url":"https://github.com/PokaInc/launcher.git","svn_url":"https://github.com/PokaInc/launcher","homepage":"https://kolide.com/launcher","size":3306,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kolide:master","ref":"master","sha":"a7b9229b35895c7af4579ae0e9e4332463d82319","user":{"login":"kolide","id":19914378,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5OTE0Mzc4","avatar_url":"https://avatars1.githubusercontent.com/u/19914378?v=4","gravatar_id":"","url":"https://api.github.com/users/kolide","html_url":"https://github.com/kolide","followers_url":"https://api.github.com/users/kolide/followers","following_url":"https://api.github.com/users/kolide/following{/other_user}","gists_url":"https://api.github.com/users/kolide/gists{/gist_id}","starred_url":"https://api.github.com/users/kolide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kolide/subscriptions","organizations_url":"https://api.github.com/users/kolide/orgs","repos_url":"https://api.github.com/users/kolide/repos","events_url":"https://api.github.com/users/kolide/events{/privacy}","received_events_url":"https://api.github.com/users/kolide/received_events","type":"Organization","site_admin":false},"repo":{"id":90072296,"node_id":"MDEwOlJlcG9zaXRvcnk5MDA3MjI5Ng==","name":"launcher","full_name":"kolide/launcher","owner":{"login":"kolide","id":19914378,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5OTE0Mzc4","avatar_url":"https://avatars1.githubusercontent.com/u/19914378?v=4","gravatar_id":"","url":"https://api.github.com/users/kolide","html_url":"https://github.com/kolide","followers_url":"https://api.github.com/users/kolide/followers","following_url":"https://api.github.com/users/kolide/following{/other_user}","gists_url":"https://api.github.com/users/kolide/gists{/gist_id}","starred_url":"https://api.github.com/users/kolide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kolide/subscriptions","organizations_url":"https://api.github.com/users/kolide/orgs","repos_url":"https://api.github.com/users/kolide/repos","events_url":"https://api.github.com/users/kolide/events{/privacy}","received_events_url":"https://api.github.com/users/kolide/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kolide/launcher","description":"Osquery launcher, autoupdater, and packager","fork":false,"url":"https://api.github.com/repos/kolide/launcher","forks_url":"https://api.github.com/repos/kolide/launcher/forks","keys_url":"https://api.github.com/repos/kolide/launcher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kolide/launcher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kolide/launcher/teams","hooks_url":"https://api.github.com/repos/kolide/launcher/hooks","issue_events_url":"https://api.github.com/repos/kolide/launcher/issues/events{/number}","events_url":"https://api.github.com/repos/kolide/launcher/events","assignees_url":"https://api.github.com/repos/kolide/launcher/assignees{/user}","branches_url":"https://api.github.com/repos/kolide/launcher/branches{/branch}","tags_url":"https://api.github.com/repos/kolide/launcher/tags","blobs_url":"https://api.github.com/repos/kolide/launcher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kolide/launcher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kolide/launcher/git/refs{/sha}","trees_url":"https://api.github.com/repos/kolide/launcher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kolide/launcher/statuses/{sha}","languages_url":"https://api.github.com/repos/kolide/launcher/languages","stargazers_url":"https://api.github.com/repos/kolide/launcher/stargazers","contributors_url":"https://api.github.com/repos/kolide/launcher/contributors","subscribers_url":"https://api.github.com/repos/kolide/launcher/subscribers","subscription_url":"https://api.github.com/repos/kolide/launcher/subscription","commits_url":"https://api.github.com/repos/kolide/launcher/commits{/sha}","git_commits_url":"https://api.github.com/repos/kolide/launcher/git/commits{/sha}","comments_url":"https://api.github.com/repos/kolide/launcher/comments{/number}","issue_comment_url":"https://api.github.com/repos/kolide/launcher/issues/comments{/number}","contents_url":"https://api.github.com/repos/kolide/launcher/contents/{+path}","compare_url":"https://api.github.com/repos/kolide/launcher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kolide/launcher/merges","archive_url":"https://api.github.com/repos/kolide/launcher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kolide/launcher/downloads","issues_url":"https://api.github.com/repos/kolide/launcher/issues{/number}","pulls_url":"https://api.github.com/repos/kolide/launcher/pulls{/number}","milestones_url":"https://api.github.com/repos/kolide/launcher/milestones{/number}","notifications_url":"https://api.github.com/repos/kolide/launcher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kolide/launcher/labels{/name}","releases_url":"https://api.github.com/repos/kolide/launcher/releases{/id}","deployments_url":"https://api.github.com/repos/kolide/launcher/deployments","created_at":"2017-05-02T19:53:30Z","updated_at":"2018-08-01T14:21:28Z","pushed_at":"2018-08-06T21:48:28Z","git_url":"git://github.com/kolide/launcher.git","ssh_url":"git@github.com:kolide/launcher.git","clone_url":"https://github.com/kolide/launcher.git","svn_url":"https://github.com/kolide/launcher","homepage":"https://kolide.com/launcher","size":3301,"stargazers_count":144,"watchers_count":144,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":42,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":27,"open_issues":42,"watchers":144,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kolide/launcher/pulls/338"},"html":{"href":"https://github.com/kolide/launcher/pull/338"},"issue":{"href":"https://api.github.com/repos/kolide/launcher/issues/338"},"comments":{"href":"https://api.github.com/repos/kolide/launcher/issues/338/comments"},"review_comments":{"href":"https://api.github.com/repos/kolide/launcher/pulls/338/comments"},"review_comment":{"href":"https://api.github.com/repos/kolide/launcher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kolide/launcher/pulls/338/commits"},"statuses":{"href":"https://api.github.com/repos/kolide/launcher/statuses/09c5cba9fdb97539baeceef0874d5252d507ed35"}},"author_association":"NONE"}}
{"actor":{"display_login":"marpaia"}}