{"action":"created","issue":{"url":"https://api.github.com/repos/heroku/heroku-buildpack-go/issues/78","labels_url":"https://api.github.com/repos/heroku/heroku-buildpack-go/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/heroku/heroku-buildpack-go/issues/78/comments","events_url":"https://api.github.com/repos/heroku/heroku-buildpack-go/issues/78/events","html_url":"https://github.com/heroku/heroku-buildpack-go/pull/78","id":63262033,"number":78,"title":"Add a way to run commands after compilation","user":{"login":"attilaolah","id":196617,"avatar_url":"https://avatars.githubusercontent.com/u/196617?v=3","gravatar_id":"","url":"https://api.github.com/users/attilaolah","html_url":"https://github.com/attilaolah","followers_url":"https://api.github.com/users/attilaolah/followers","following_url":"https://api.github.com/users/attilaolah/following{/other_user}","gists_url":"https://api.github.com/users/attilaolah/gists{/gist_id}","starred_url":"https://api.github.com/users/attilaolah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attilaolah/subscriptions","organizations_url":"https://api.github.com/users/attilaolah/orgs","repos_url":"https://api.github.com/users/attilaolah/repos","events_url":"https://api.github.com/users/attilaolah/events{/privacy}","received_events_url":"https://api.github.com/users/attilaolah/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-20T16:45:49Z","updated_at":"2015-06-30T23:35:02Z","closed_at":"2015-06-30T23:35:02Z","pull_request":{"url":"https://api.github.com/repos/heroku/heroku-buildpack-go/pulls/78","html_url":"https://github.com/heroku/heroku-buildpack-go/pull/78","diff_url":"https://github.com/heroku/heroku-buildpack-go/pull/78.diff","patch_url":"https://github.com/heroku/heroku-buildpack-go/pull/78.patch"},"body":"This is useful e.g. for running migrations, when the tools required are not going to be built (e.g. because they are vendored in `Godeps`).\r\n\r\n`POST_BUILD_COMMAND` can be something simple, or it can point to a script inside the repo.\r\n\r\nHere's an example post-install script:\r\n\r\n```sh\r\nexport PATH=\"$PATH:$(godep path)/bin\"\r\ngodep go install github.com/some/vendored/cmd/migrate\r\nmigrate -env=heroku\r\n```\r\n\r\n---\r\n\r\nI am of course open to suggestions, if there's a better way to do this, however this seemed to be the simplest solution."},"comment":{"url":"https://api.github.com/repos/heroku/heroku-buildpack-go/issues/comments/117372616","html_url":"https://github.com/heroku/heroku-buildpack-go/pull/78#issuecomment-117372616","issue_url":"https://api.github.com/repos/heroku/heroku-buildpack-go/issues/78","id":117372616,"user":{"login":"freeformz","id":103,"avatar_url":"https://avatars.githubusercontent.com/u/103?v=3","gravatar_id":"","url":"https://api.github.com/users/freeformz","html_url":"https://github.com/freeformz","followers_url":"https://api.github.com/users/freeformz/followers","following_url":"https://api.github.com/users/freeformz/following{/other_user}","gists_url":"https://api.github.com/users/freeformz/gists{/gist_id}","starred_url":"https://api.github.com/users/freeformz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeformz/subscriptions","organizations_url":"https://api.github.com/users/freeformz/orgs","repos_url":"https://api.github.com/users/freeformz/repos","events_url":"https://api.github.com/users/freeformz/events{/privacy}","received_events_url":"https://api.github.com/users/freeformz/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T23:35:02Z","updated_at":"2015-06-30T23:35:02Z","body":"This is something very tricky to do right in the context of a build.\r\n\r\nI think we need to find some patterns that help us run the migrations explicitly in the context of an app and it's config instead of during build time, which is increasingly being divorced from the git push model (see the new docker stuff, pipelines, etc).\r\n\r\nI plan to use the migrate package (https://github.com/mattes/migrate) to explore this though.\r\n\r\nThanks for your input, but I'm closing this for now."}}