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

Feature Request - Homebrew #220

Open
vmsimon opened this issue Jan 19, 2023 · 1 comment
Open

Feature Request - Homebrew #220

vmsimon opened this issue Jan 19, 2023 · 1 comment

Comments

@vmsimon
Copy link

vmsimon commented Jan 19, 2023

It would be nice if the installation also offered homebrew support.

Just create a folder "Formula" for this, inside this create a file called "cloudctl.rb"

Insert the following content into the "cloudctl.rb" file
(Static example for the current release 0.11.4)

`class Cloudctl < Formula
release = "0.11.4"

desc "Commandline client for Kubernetes as a Service and more!"
homepage "https://github.com/fi-ts/cloudctl"
url "https://github.com/fi-ts/cloudctl/"
version release
if OS.mac?
if Hardware::CPU.arm?
url "https://github.com/fi-ts/cloudctl/releases/download/v#{version}/cloudctl-darwin-arm64"
sha256 "eab57802c79398fde3e1c64efb57f3a518c12200d2d4274436c76cca74f5a99b"
else
url "https://github.com/fi-ts/cloudctl/releases/download/v#{version}/cloudctl-darwin-amd64"
sha256 "f1393a9ae9d18694f0e704c860a57d12b364a27b53d92f457df8b0cc5ce41a40"
end
elsif OS.linux?
if Hardware::CPU.arm?
url "https://github.com/fi-ts/cloudctl/releases/download/v#{version}/cloudctl-linux-arm64"
sha256 "notYetReleased"
else
url "https://github.com/fi-ts/cloudctl/releases/download/v#{version}/cloudctl-linux-amd64"
sha256 "9c31b948e14a62caa1acc06bbc038f44da5947f692091f264216ff102e515d6c"
end
end

def install
mv Dir.glob("cloudctl-*").first, "cloudctl"
bin.install "cloudctl"
end
test do
cloudctl help
end
end
`

To-Do :
with every release of a new cloudctl version, the parts "release" and "sha256" has to be set to the new values

Install with homebrew is than simple

  1. brew tap fi-ts/cloudctl https://github.com/fi-ts/cloudctl

  2. brew update

  3. brew install cloudctl

@majst01
Copy link
Collaborator

majst01 commented Jan 20, 2023

Thanks for bringing this up, do you mind creating a PR with your already implemented Parts ?

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

No branches or pull requests

2 participants