galasa-dev / projectmanagement

Project Management repo for Issues and ZenHub
7 stars 3 forks source link

galasactl available using brew install for mac users #1728

Open techcobweb opened 6 months ago

techcobweb commented 6 months ago

Story

As a mac user of galasactl I want to be able to install and upgrade the tool with brew tooling, so I don't have to find the download page, and the install is easier.

Background

Syntax might be like this:

brew install galasactl

galasactl is an executable available from here: https://github.com/galasa-dev/cli/releases

Tasks

techcobweb commented 2 weeks ago

Adam Coulthard, from https://openmainframeproject.slack.com/archives/C061Q1CHV51/p1719395608591169

Just incase anyone is interested, to make it really easy to install the galasactl on my mac I've created a Cask for it in homebrew. Unfortunately because there isn't much activity on the repository yet. We cannot get it into the main homebrew-casks yet. If you want to use it then all you need to do is install homebrew and then run the following:

brew tap adamcoulthard/tap
brew install --no-quarantine galasactl

At the moment the --no-quarantine is required because of gatekeeper. This will download the latest galasactl x86 / apple dependent on laptop hardware. (edited)

techcobweb commented 2 weeks ago

I tried it out, seemed to work like a dream on my apple/M1 mac.

For the benefit of others, it also supports the usual things:

brew upgrade --no-quarantine galasactl
brew list galasactl
brew info galasactl
brew uninstall galasactl

I think this will be the favoured install procedure for Mac users once it is in the official Cask.

techcobweb commented 2 weeks ago

@adamcoulthard I also noticed that the implementation is pretty limited so far... in that it's hard-coded to only install v0.35.0. See https://github.com/adamcoulthard/homebrew-tap/issues/1

adamcoulthard commented 2 weeks ago

Yeah it is hard coded at the moment. I’ve not looked into different versions but I do have a need for that. So might need to investigate how to allow different versions.

adamcoulthard commented 2 weeks ago

Mmmm I’m not sure that you can version control from homebrew. All the information I’ve found so far is you just have the option to install / upgrade to the latest version. You can ask home brew to use a specific commit and so get the version you want but that’s all.

techcobweb commented 1 week ago

Looks to me that the convention is to do @{version} . eg: brew install galasactl@0.35.0

Seems that what we need is a script/program which will create the formula based on the desired version, to generate something similar to what you have today with a boiler-plate set of function, but the checksums/version numbers changed. eg: galasactl@0.35.0, galasactl@0.36.0 ...etc.

And so that the brew install galasactl just gets refreshed/updated to be the same formula as the latest released version ? Assuming you can update a formula that is.

adamcoulthard commented 1 week ago

I've updated my tap adamcoulthard/tap to contain versions going back to 0.33.0. We could add others but I'm not sure it's worth it. There is still the galasactl as well so that if someone installed that it will always be the latest version. Yep you can update a cask easily enough and all is good that is what I did going from 0.34.1 -> 0.35.0.

It probably won't take long to create a simple script that would perform all these updates and create a new cask if required.