Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebrew formula started #23

Closed
andyjeffries opened this issue Apr 26, 2016 · 10 comments
Closed

Homebrew formula started #23

andyjeffries opened this issue Apr 26, 2016 · 10 comments

Comments

@andyjeffries
Copy link

The problem I'm having is in the final build command. It's doing something like this:

go build -o /usr/local/Cellar/leaps/0.5.0/bin/leaps cmd/leaps/leaps.go
# command-line-arguments
# cmd/leaps/leaps.go:164: undefined: assetFS

I can't build it with go build -o /usr/local/Cellar/leaps/0.5.0/bin/leaps cmd/... because it doesn't like the -o flag when giving multiple packages.

Any tips on how I can do a one liner build for leaps that just outputs me a single binary in a configurable place?

If you want to see, the issue on Homebrew is at Homebrew/homebrew-core#610 and the current version of the formula is at https://github.com/andyjeffries/homebrew-core/blob/master/Formula/leaps.rb

@Jeffail
Copy link
Owner

Jeffail commented Apr 26, 2016

Hey @andyjeffries, go build -o /usr/local/Cellar/leaps/0.5.0/bin/leaps cmd/leaps ought to work. Thanks for looking into this, having leaps in homebrew would be awesome!

@andyjeffries
Copy link
Author

Doesn't work for me.

% ls -l
total 720
-rw-r--r--   1 andy  admin    1056 25 Apr 20:36 LICENSE
-rw-r--r--   1 andy  admin    2528 25 Apr 20:36 README.md
drwxr-xr-x  10 andy  admin     340 25 Apr 20:36 client
drwxr-xr-x   3 andy  admin     102 25 Apr 20:36 cmd
-rw-r--r--   1 andy  admin   30052 25 Apr 20:36 leaps_logo.png
-rw-r--r--   1 andy  admin  326710 25 Apr 20:36 leaps_screenshot.png
drwxr-xr-x   9 andy  admin     306 25 Apr 20:36 lib
drwxr-xr-x   4 andy  admin     136 26 Apr 15:44 src
drwxr-xr-x   3 andy  admin     102 25 Apr 20:36 test
drwxr-xr-x   3 andy  admin     102 25 Apr 20:36 vendor
Andys-MacBook-Air% go build -o /usr/local/Cellar/leaps/0.5.0/bin/leaps cmd/leaps
can't load package: package cmd/leaps: open /usr/local/Cellar/go/1.6.1/libexec/src/cmd/leaps: no such file or directory

@Jeffail
Copy link
Owner

Jeffail commented Apr 26, 2016

Ah okay, try either a relative path:
go build -o /usr/local/Cellar/leaps/0.5.0/bin/leaps ./cmd/leaps
or an absolute gopath:
go build -o /usr/local/Cellar/leaps/0.5.0/bin/leaps github.com/jeffail/leaps/cmd/leaps

@andyjeffries
Copy link
Author

That's got it working. I've got one last problem on brew test and then I'll squash the commits and raise the PR. Hopefully today...

@andyjeffries
Copy link
Author

@andyjeffries
Copy link
Author

There are some problems with the Formula, leaving it in a less than ideal state but it works. If you have any insights, I'd appreciate it...

Homebrew/homebrew-core#627 (comment)

@andyjeffries andyjeffries reopened this Apr 27, 2016
@Jeffail
Copy link
Owner

Jeffail commented Apr 27, 2016

Awesome, I'll take a look this evening. Thanks for getting us this far! I really appreciate all your help and enthusiasm 😄

@andyjeffries
Copy link
Author

You're welcome mate.

It's in Homebrew now, so if you do brew update && brew install leaps it's all installed and working :-)

I just tested it on one of my guys' machines.

@Jeffail
Copy link
Owner

Jeffail commented Apr 27, 2016

Homebrew/homebrew-core#663 😄

@Jeffail Jeffail closed this as completed Apr 27, 2016
@andyjeffries
Copy link
Author

I'd tried doing exactly the same thing and it didn't work for me, but oh well...

Glad it's all in and they're 100% happy with the formula now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants