- changed status to open
Heroku instructions no longer works on go 1.5
When you try to import the cmd package with _
prefixed, you'll get an error message like this:
can't load package: /home/shuhao/go/src/gitlab.com/shuhao/towncrier/install_goose.go:3:8: import "bitbucket.org/liamstask/goose/cmd/goose" is a program, not an importable package
godep: go exit status 1
Is there another way of installing the goose binary during heroku buildpacks?
Comments (5)
-
-
Copy the cmd/goose package into a subdirectory in your main application, then in Heroku you can run goose normally with 'heroku run goose -env production up'
-
@peter_li I tried what you suggested, but the locally compile version of the goose executable doesn't run on Heroku. I get the following error:
$ heroku run bin/goose -env production up Running bin/goose -env production up on massaga-production... up, run.8075 bash: bin/goose: cannot execute binary file: Exec format error
-
Hi all, With the change to heroku's go build pack, you can now install
goose
from your vendor directory if you are usinggovendor
for dependency management.In the
heroku.install
section of thevendor.json
file, just add the path to goose as one of the build targets and you are gtg.For example, here is what my
vendor.json
file looks like now:"heroku": { "goVersion": "go1.7", "install": [ ".", "bitbucket.org/liamstask/goose/cmd/goose" ] },
-
Account Deleted Hi all. I'm using
glide
, so I had to to it a little bit differently.I created a file named
deps.go
with the following content:// Use a phony build constraint to force glide into keeping some dependencies // +build glide_deps package main import ( _ "bitbucket.org/liamstask/goose/cmd/goose" )
The build tag is never used, so that the build never fails, but when glide parses the files during a
glide update
it still detects the dependency and keeps it inglide.lock
and in thevendor
dir.Then on Heroku I set the
GO_INSTALL_PACKAGE_SPEC
environment variable for my project tomyapp myapp/vendor/bitbucket.org/liamstask/goose/cmd/goose
. This way, both my app and goose get build when I deploy. - Log in to comment
Thanks for the bug report. I'm unfortunately not sure how to resolve this. We'll leave this open for now.