fermyon / homebrew-tap

Fermyon's Homebrew Tap
Apache License 2.0
2 stars 9 forks source link

new tap: bart / bartholomew #13

Closed dimitrilw closed 10 months ago

dimitrilw commented 11 months ago

Installing spin via homebrew was a real joy. I'd like to have a tap for bart, too.

Were this request to be officially implemented, then documentation should be updated, too. Like the Bartholomew quickstart page installation instructions.

And while I've not-yet made a homebrew tap, I am always willing to learn something new. So I am going to fork this repo and see what I can break on my computer. Yay! \o/

No promises, but I expect that I will give this a go later tonight and/or tomorrow. Cheers!

dimitrilw commented 11 months ago

Ok, so I was surprised at just how straight-forward a basic Formula really is. ...if there are release artifacts to link, like in the Formula for spin. However, I was just messing around with trying a bart Formula that is a bit more intricate:

...anyway, I think it's super messy and not really what you all would truly want. So, perhaps I should roll back and just ask: Maybe this should be preceded by a Github Action that takes release-tagged commits and builds the artifacts. Then I read something somewhere (too many tabs open right now; I'll try to find the ref) about putting an Action in the Homebrew Formula repo and then that Action can be triggered to auto-update the Formula file with proper lines to ref the new version, plus pinned versions. Sounded awesome, but first step is just getting it working.

So may I ask if you all have any plans on the bart repo holding built release artifacts, like the spin repo does?

itowlson commented 11 months ago

Release artifacts for bart have never been particularly on our radar, but we do get requests for them, to the point where I feel like I'm in the old joke where the shopkeeper says "we don't stock those because there's no demand for them, and you're the fourth person I've had to explain that to this week." A Homebrew tap for it would be a super motivation to do it! Let me see if I can put something together, and thanks for offering to contribute on this!

dimitrilw commented 11 months ago

The Homebrew tap is ready, pending release artifacts. As you know, it took almost no effort. But the "messy" tap could be used right now, but I don't think anybody wants that disaster of an installer script. It works on my computer; I cannot say with any confidence that it will work for others. ...better to just link to the pre-built artifacts.

I've made auto-build pipelines in Gitlab & Bitbucket, but have not built the same in a Github Action. If you desire help making an action, I can fork the Bart repo and help make a Github Action.

I like learning new stuff in my free time. I have issues. 😂

itowlson commented 11 months ago

@dimitrilw That sounds a jolly good issue to have! I'm afraid I've thwarted your learning this time though: https://github.com/fermyon/bartholomew/pull/180 should do what you need I think, once agreed and once we do a release from it. Let me know if the structure shown in the screenshot doesn't mesh with what you were expecting.

dimitrilw commented 11 months ago

image

dimitrilw commented 11 months ago

Looks perfect! Thank you. As soon as that's through, then I will update forked repo with correct artifact URIs & make PR for Homebrew Formula to "go live." Thank you, @itowlson !

dimitrilw commented 11 months ago

Of note: I have branch roughly ready to submit PR. Just awaiting real binaries.

https://github.com/dimitrilw/homebrew-tap/tree/issue/13-bart-formula

Also, when researching Homebrew Formulas, I read that the test block can contain an assertion to ensure matching version. The bart.rb file contains an example of the assertion test. In contrast, I believe the spin.rb file's test block just runs spin --version but does not validate output. However, since I am 100% green to Homebrew Formulas, I am not making any PR for changing the spin Formula's test-block until after this PR is finished, merged, and I personally install bart via Homebrew & witness everything working as intended.

Ref:

test do
    # system "#{bin}/bart", "--version"
    # TODO: test & confirm this is proper syntax, then adjust spin.rb too
    assert_match "bart 0.8.0", shell_output("#{bin}/bart --version")
  end
itowlson commented 11 months ago

@karthik2804 @vdice Is it worth doing a release of Bartholomew so that

  1. @dimitrilw can finalise the formula
  2. We can make confirm that the new GH action works while it's not urgent
vdice commented 11 months ago

@itowlson sgtm! Looks like at least one feature will be included as well: https://github.com/fermyon/bartholomew/compare/v0.8.0...main

itowlson commented 11 months ago

@dimitrilw Built binaries are at https://github.com/fermyon/bartholomew/releases/tag/v0.9.0 if you fancy taking a crack at them - let me know if there's any problems with them, and thanks!

dimitrilw commented 11 months ago

You're the best @itowlson ! I'll take a peek later tonight or tomorrow. :)

dimitrilw commented 10 months ago

I apologize for delay -- busy week & got sick. Nasty cold -- hope you don't catch it by reading this comment. Anyway, I will get to it later tonight. 😄

dimitrilw commented 10 months ago

Reminder to self: After Fermyon accepts PR (about to make), then need to test install via brew & confirm the altered test routine works. If it does, make new PR for modifying spin.rb to also use version confirmation type of instal test.

Ref:

  test do
    assert_match "bart 0.9.0", shell_output("#{bin}/bart --version")
  end