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 recipe #104

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jeroenvandijk
Copy link
Contributor

@jeroenvandijk jeroenvandijk commented Oct 12, 2018

A basic packaging script for Mac users. I've tested it on a colleague and myself.

It can be used via:

brew reinstall --verbose --force --HEAD https://raw.githubusercontent.com/jeroenvandijk/closh/feature/homebrew/packaging/closh_zero.rb

closh
$ (println "hello")
hello
It could probably be more generic, but I don't know much about homebrew recipes. The test block also doesn't seem to work. I've added fish as dependency because of #99

Note --verbose --force are not necessary but keep things up to date and help debugging

Usage
brew reinstall --verbose  -—debug —force --HEAD homebrew.rb
@jeroenvandijk
Copy link
Contributor Author

Hehe looking at install process of some of my collegeaus, distributing an uberjar directly would speed up the install process a lot

@dundalek
Copy link
Owner

Cool, #99 is fixed now so we can remove the fish dependency.

As for the binary name I would probably suggest using closh-zero-jvm instead of just closh.

It is longer to type but I think it has benefits of possibility to use multiple flavors at the same time (like closh-zero-lumo and closh-zero-planck if it gets ported) and better future compatibility. What do you think?

@jeroenvandijk
Copy link
Contributor Author

Yes, good points, I fully agree. It is also easy to create your own alias or set it as your default shell, should the name be too long.

Since the implementations and requirements of the different flavors are so different I think it's a good idea to isolate the (homebrew) recipes as well. In the examples I don't see projects with several recipes, so I'm guessing there is some way to define sub recipes. I'll look into that. Otherwise it would mean that the recipe has to be named closh-zero-jvm.rb instead of closh.rb. What do you think here?

@dundalek
Copy link
Owner

It looks like those sub recipes could probably utilize formula options.

And once we tag a release and build uberjars for download, we could add the uberjar option for simpler and faster installation.

@evelant
Copy link

evelant commented Feb 14, 2019

I tried to install this brew recipe and it failed. Here is the output:

Andrews-MBP:~ imagio$ brew install --HEAD closh_zero
==> Cloning https://github.com/dundalek/closh.git
Updating /Users/imagio/Library/Caches/Homebrew/closh_zero--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 59293de Try to update docker image to fix ci
==> boot uberjar
Error: An exception occurred within a child process:
Errno::ENOENT: No such file or directory - target/project.jar

@dundalek
Copy link
Owner

I think the recipe could be changed to download the jar from the releases and depending only on java (without the need for boot). I'm not on mac so any help is appreciated.

@orlin
Copy link

orlin commented May 10, 2020

I wrote a bash script gh-get-bin to download the latest closh-zero.jar with. It depends on JSONPath.sh which I install with gh-install by running gh-install mclarkson/JSONPath.sh JSONPath.sh ~/bin/ on my system. However, almost forgot that JSONPath.sh requires gawk to run, so I'm not sure if this would help.

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

Successfully merging this pull request may close these issues.

None yet

4 participants