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
bash-snippets 1.15.1 (new formula) #16076
Conversation
Same review comments as here: #15107 (comment) |
Does this mean you want to use the |
@alexanderepstein yes, instead of a bin.install loop and a man.install. |
I am not too proficient in Ruby, so after a little searching for running a bash script within a ruby script I came up with a result of |
|
Does it look correct now? I got rid of the build without options because I am passing the all argument to the install script which installs all of the tools. |
@alexanderepstein yes. You'll need to teach the script to accept the prefix option, though :) |
Do you mean that my install script should be able to be run as |
@alexanderepstein
or
or
So you'll get something like
and then need to parse out the prefix directory, and install the commands in |
I believe I added this correctly to my install script. I then updated the version and changed the sha256 for v1.15.1. |
@alexanderepstein cool, thanks! Now on to the other review comment :)
Take a look at the |
Will look into writing these. My build is failing because the directory that the file is trying to be copied over to does not exist. How can I create the directories before running my install script in Ruby? |
@alexanderepstein your script will need to make sure to create the directories first using You can set the shebang at the top of the script to
to debug it. |
Would |
Yes that should work.
It will need to be part of the install script. ( |
I added the two script changes so the build should be successful now (if those were the only issues). And will still look into writing tests. I have 15 tools at the moment that are packaged in bash-snippets do i test all of them or only some? |
Build still failed it seems like either I don't have the necessary permissions to create the directory or it isn't attaching the prefix before creating the directory |
@alexanderepstein I think this diff will fix it:
|
Working now with your fix 😄 |
Maybe three of the most popular ones? |
That works I will look into adding these tests as soon as possible |
Thanks @alexanderepstein! |
Thanks! |
If i use |
You can use |
Let me know if those tests are written correctly and work :) |
Formula/bash-snippets.rb
Outdated
end | ||
|
||
test do | ||
system "#{bin}/weather", "-h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can leave out each of the -h
and -v
tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed them
@alexanderepstein note I've pushed a commit removing the |
Noted. Thank you so much for all your help and working with me to get this into homebrew-core 😄 |
Thanks for your first contribution to Homebrew, @alexanderepstein! Without people like you submitting PRs we couldn't run this project. You rock! |
You're welcome! |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?