-
Notifications
You must be signed in to change notification settings - Fork 53
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
Create Homebrew tap? #59
Comments
Hello @agilgur5 Thanks reporting. I'm not a mac user, so for giving help to support mac stuff, I need a way to access a machine that would behave like a mac (either a contributor with a mac testing stuff together, or a mac VM that I could ssh to, or a container if such exists). In the past I was using travis CI but the service API or the license changed and it doesn't work anymore. I didn't spent time on it. See #54 I don't use brew neither, I have to learn it before I could provide something.
Ah, virus are everywhere those time. 😉 So you created an issue, good point. As you may have read from the README: That was it first design. I introduced Or I could embed Having a packaged version of Actually I'm involved in a huge This repos is only for How can I help you? I mean, given you mention a top-level repos I can accept a pull request for The doc you linked says:
We can also review the documentation for explaining things differently on how to install etc. Please explain your goal more precisely on what would be achieved, given the |
Thanks for the quick response @Sylvain303 ! Can definitely help on the Mac front
Yea of course, I'd be willing to fully contribute and test this myself 🙂
Ah I went through this change myself recently in some of my OSS repos so I can actually help with that too! I'll comment there with more details
I did actually start that job in the middle of lockdown in 2020 haha 😅 Sidebar --
|
Hmm if this is considered "Acceptable" by Homebrew, I might be able to PR it to the main Homebrew repo instead actually. Small libraries and owners usually aren't acceptable but Regardless of the outcome of that, I can still help with embedding |
Hello @agilgur5 A lot of stuff here. But it's OK because of the discussion around the distribution mechanism and related issues digs quite a lot of question and thinking. 😉 Lets push discussion and sample of embedding We will definitely discuss CI and mac related testing in #54. You said, « Brew does work on Linux » great but tools differ from mac and Linux (sed, awk, realpath, bash, etc.) So re-creating a mac like environment is mandatory, see other issues mac related... But we would fix that together. I also could explore, having a docker VM for that: Back on track about homebrew related stepsdocopt Organization: long story shortI'm not a member of docopt Organization right, so I can't create toplevel repository myself. docopt story came with the python version first, which is at abandon, with a fork solely for python. It took me two years to be granted as new I probably could ask more privileges. I will do it when my new Go parser will be ready. Typo
|
macOS testing
Very true! I meant more as like a "smoke test" of sorts that if the Brew package works on Linux, there's a good chance it'll work on macOS with the proper binary.
Oh I think I've heard of this before. There's also Docker for ARM which I have used a handful of times for virtualization in robotics contexts. docopt/docopts historyOrg
Gotcha
Yep I remember this. I didn't know there was an updated fork of the Python version though, that's good to hear! I was sad when I saw a lot of the docopt libraries in this org weren't maintained despite it being such a great tool 😢
I'm an open-source maintainer and contributor myself (see my profile), so I definitely get the struggle 😅 s vs. no s
Yup I'm aware of that
Ah sorry for the confusion. If it were a top-level Tap that could potentially hold multiple Formulae, I think Hopefully that's less confusing now 😅 cousin
Yea I checked it out 2 years ago too and had a similar opinion. Very interesting. But didn't fit the use case of what I working on as we had like ~20 tiny scripts, so that would be a heck of a lot code to generate as opposed to just calling
Yea I suppose that's true since it does depend on the Python version too. I honestly hadn't looked at it in a while so I totally forgot it used Go build
Yea I thought that was a great idea! Much easier to work with statically linked binaries for shell scripts!
Ohhhh. I was looking at the
Yea Debian packaging is definitely more complicated than Brew at least 😅
It's a great solution for now! 👍 👍
Agreed
haha that it would
Ah I was wondering why the README was written the way it was. So, interestingly enough, For third-party Taps, this isn't required though, so can start with binaries and then could expand to doing a full build. Brew
Yea I don't think there's much "real" benefit for Linux either.
Ok, sounds like a plan then!
That's an interesting idea 🤔 Unfortunately it does not seem like Brew supports this from what I could find online:
Notably, I saw that
|
goreleaserI didn't know this software, may it could replace deploy.sh As mentioned I didn't spent time investigating on releases. And rereading some code I produced earlier, I see I was lost in writing shell script for Bash expert / hacker / PoC. 🤔 Some cleanup will come in comment and tools, that's OK. brew build / go buildYou will need to build the code, you can either try You may ultimately have a full build env in a docker at the end. I didn't try it since month, I've to look at it first. updating doc and rephrase[binary distribution and security concern]
Following our exchange I will document that too, in order to explain my choice and why I discourage getting not signed / reviewed pre-build binaries, for a script that could possibly your sideI still didn't explore yet homebrew more than the few quote we exchanged. Neither I did on github Actions, nor of setting up macos like VM. I will let you know when I will have levelup ➕ 🆙 Let me know your blocker I will investigate my code, to remove barrier, if any. Or give you quick key to speedup your exploration. |
Hi @Sylvain303, I'm back after a long delay (see #54 (comment) for more details on the delay) and did a good bit of work on this repo today!
I wrote up a PR migrating from
Per the PR, I ended up replacing the whole custom dependency management with the now built-in Go modules (i.e. So I ended up not needing Docker or anything, though this process can simplify / standardize the
Now that I generally understand how this repo works, builds, and the dependency management, I think I should be able to make a PR directly to
I wrote up a PR earlier today for that as well, see #62 🙂
All your explanations here were plenty! Even 4 months after I was able to come back and reference them -- glad that we both have detailed comments 🙂 |
- docopts does not yet have a Brew formula, so testing creating one with my tap - see also my issue: docopt/docopts#59
testing tap (+
|
Problem
Installation currently requires not just downloading pre-built binaries via GitHub Releases, but also cloning the repo or otherwise downloading the
docopts.sh
helper.Suggested Solution
Distributing via a package manager could make it much easier to get started with
docopts
, especially for Shell projects that don't have a language-specific package manager to use.On macOS at least, Homebrew is the defacto default package manager (Brew also works on Linux, though there are better package managers available there). Can create a repo under the
docopt
organization,homebrew-docopt
which will serve as the Homebrew Tap. Taps are just git repos (with Ruby code), so it's relatively straightforward in that sense.An example of a simple Homebrew tap is Instrumenta's (creator of Conftest,
kubeval
, etc).As you can see there, a simple Formula can just reference a GitHub Release, acting as a simple wrapper around the existing pre-built binaries.
Contributing
Would be happy to contribute building this or even build a standalone repo myself and transfer it to the
docopt
organization if that is acceptable.Misc
I used
docopts
at my last job and it helped a ton with both documentation and arg/option parsing, but installation was my team's main gripe with it. Awesome tool that I would love to make easier to install!The text was updated successfully, but these errors were encountered: