Open vmsimon opened 1 year ago
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
brew tap fi-ts/cloudctl https://github.com/fi-ts/cloudctl
brew update
brew install cloudctl
Thanks for bringing this up, do you mind creating a PR with your already implemented Parts ?
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