I've developed a web app using Go, which I've deployed to Heroku. I'm using mattes/migrate to manage migrations. It works great locally, but the migrate
command-line binary isn't available when I deploy to Heroku.
The only binaries that are included are my own. Is there a way to have Godeps compile and install binaries provided by a dependency?
Just create a file where you include the executable path.
See this issue for Goose (mattes/migrate competitor)
I'd expect the equivalent for mattes/migrate would be:
package main
import _ "github.com/mattes/migrate"
Heroku's current recommended solution is to simply clone the command into your own repo (see github.com/tools/godep/issues/306).
I copied the mattes/migrate/main.go
into the cmd/migrate
directory in my own project. This builds the command just like my own server command.
It's not ideal, but it works.