From b092df1bec428f600b984090646457bfb40fb1e5 Mon Sep 17 00:00:00 2001 From: Yukihiro Okada Date: Sat, 18 Apr 2020 13:25:09 +0900 Subject: [PATCH] Add homebrew formula --- Formula/k2tf.rb | 20 ++++++++++++++++++++ README.md | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 Formula/k2tf.rb diff --git a/Formula/k2tf.rb b/Formula/k2tf.rb new file mode 100644 index 0000000..d54842d --- /dev/null +++ b/Formula/k2tf.rb @@ -0,0 +1,20 @@ +class K2tf < Formula + desc "Kubernetes YAML to Terraform HCL converter" + homepage "https://github.com/sl1pm4t/k2tf" + url "https://github.com/sl1pm4t/k2tf/archive/v0.4.0.tar.gz" + sha256 "d6070de2afc7bacf8a6ead24ad81b7d94f16e5106941ac78ced9b795ff4f8403" + head "https://github.com/sl1pm4t/k2tf.git" + + bottle :unneeded + + depends_on "go" => :build + + def install + system "go", "build" + bin.install "k2tf" + end + + test do + system "#{bin}/k2tf", "-v" + end +end diff --git a/README.md b/README.md index 5960c08..b7db398 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,14 @@ Download Binary from GitHub [releases](https://github.com/sl1pm4t/k2tf/releases/ _See below_ +**Homebrew** + +``` +$ brew tap sl1pm4t/k2tf https://github.com/sl1pm4t/k2tf.git +$ brew install k2tf +``` + + ## Example Usage **Convert a single YAML file and write generated Terraform config to Stdout**