From 44201ab30ec0ee9dea3a48e52f9e122d308d821c Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Thu, 25 Mar 2021 13:01:34 -0700 Subject: [PATCH] Add brew Formula for a Tap This should make it easier for folks to install the CLI on MacOS. --- HomebrewFormula/kubectl-buildkit.rb | 24 ++++++++++++++++++++++++ README.md | 14 ++++++++++++++ docs/release.md | 1 + 3 files changed, 39 insertions(+) create mode 100644 HomebrewFormula/kubectl-buildkit.rb diff --git a/HomebrewFormula/kubectl-buildkit.rb b/HomebrewFormula/kubectl-buildkit.rb new file mode 100644 index 00000000..efc98ae3 --- /dev/null +++ b/HomebrewFormula/kubectl-buildkit.rb @@ -0,0 +1,24 @@ +class KubectlBuildkit < Formula + desc "BuildKit CLI for kubectl" + homepage "https://github.com/vmware-tanzu/buildkit-cli-for-kubectl" + url "https://github.com/vmware-tanzu/buildkit-cli-for-kubectl/archive/refs/tags/v0.1.2.tar.gz" + license "Apache-2.0" + head "https://github.com/kubernetes/kubernetes.git" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + depends_on "go" => :build + + def install + system "make", "build", "VERSION=" + version + bin.install Dir["bin/darwin/kubectl-build*"] + end + + test do + run_output = shell_output("#{bin}/kubectl-buildkit 2>&1") + assert_match "BuildKit is a toolkit for converting source code", run_output + end +end diff --git a/README.md b/README.md index 61c29152..4a97838b 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,20 @@ documentation for more information. ## Getting started +### Installing on MacOS + +We include a [Brew](https://docs.brew.sh/) Tap in this repo. First add the Tap with +```sh +brew tap vmware-tanzu/buildkit-cli-for-kubectl https://github.com/vmware-tanzu/buildkit-cli-for-kubectl +``` + +Then you can install with +```sh +brew install kubectl-buildkit +``` + +Keep up-to-date with `brew upgrade kubectl-buildkit` (or `brew upgrade` to upgrade everything) + ### Installing on Windows We produce [Choco](https://docs.chocolatey.org/) compatible packages in our https://github.com/vmware-tanzu/buildkit-cli-for-kubectl/releases diff --git a/docs/release.md b/docs/release.md index df5e2ad8..5f33c9c8 100644 --- a/docs/release.md +++ b/docs/release.md @@ -18,6 +18,7 @@ git log --oneline --no-merges --no-decorate v0.1.1..v0.1.2 * Rephrase commit messages where necessary to better summarize the fix for readability * Have another maintainer review the release * Publish the release +* Update the `HomebrewFormula/kubectl-buildkit.rb` to pin to the new version ## When you're making release CI changes