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

new tap: bart / bartholomew #13

Closed
dimitrilw opened this issue Sep 24, 2023 · 13 comments · Fixed by #15
Closed

new tap: bart / bartholomew #13

dimitrilw opened this issue Sep 24, 2023 · 13 comments · Fixed by #15

Comments

@dimitrilw
Copy link
Contributor

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
Copy link
Contributor Author

dimitrilw commented Sep 26, 2023

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:

  • check host OS
  • check for build tooling: curl/wget, tar, make, cargo, & rustc
  • download 0.8.0 source tarball
  • ?
  • profit
    { kidding about the "?"... just curl, untar, make, and move bin to Homebrew bin path }

...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
Copy link

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
Copy link
Contributor Author

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
Copy link

@dimitrilw That sounds a jolly good issue to have! I'm afraid I've thwarted your learning this time though: fermyon/bartholomew#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
Copy link
Contributor Author

image

@dimitrilw
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link

itowlson commented Oct 9, 2023

@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
Copy link
Member

vdice commented Oct 9, 2023

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

@itowlson
Copy link

@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
Copy link
Contributor Author

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

@dimitrilw
Copy link
Contributor Author

dimitrilw commented Oct 19, 2023

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
Copy link
Contributor Author

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

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 a pull request may close this issue.

3 participants