From c071739e616c65113e5c6af2a9a5d81cc340adc8 Mon Sep 17 00:00:00 2001 From: Liam Nattrass Date: Thu, 9 Nov 2023 23:34:17 -0500 Subject: [PATCH 1/2] Krew --- krew.hcl | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 krew.hcl diff --git a/krew.hcl b/krew.hcl new file mode 100644 index 00000000..5857a724 --- /dev/null +++ b/krew.hcl @@ -0,0 +1,33 @@ +binaries = ["kubectl-krew"] +env = { + "KREW_ROOT": "${HERMIT_ENV}/.hermit/krew/root", +} + +on "unpack" { + rename { + from = "${root}/krew-${os}_${arch}" + to = "${root}/kubectl-krew" + } +} + +platform "darwin" "amd64" { + source = "https://github.com/kubernetes-sigs/krew/releases/download/v${version}/krew-${os}_${arch}.tar.gz" +} + +platform "darwin" "arm64" { + source = "https://github.com/kubernetes-sigs/krew/releases/download/v${version}/krew-${os}_${arch}.tar.gz" +} + +platform "linux" "amd64" { + source = "https://github.com/kubernetes-sigs/krew/releases/download/v${version}/krew-${os}_${arch}.tar.gz" +} + +description = "📦 Find and install kubectl plugins" +homepage = "https://krew.sigs.k8s.io" + +version "0.4.4" { + auto-version { + github-release = "kubernetes-sigs/krew" + } +} + From 541375eec10697dd98ba202ee1abc1f4932f4ac3 Mon Sep 17 00:00:00 2001 From: Liam Nattrass Date: Thu, 9 Nov 2023 23:51:19 -0500 Subject: [PATCH 2/2] fix: Krew root --- krew.hcl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/krew.hcl b/krew.hcl index 5857a724..fb56f877 100644 --- a/krew.hcl +++ b/krew.hcl @@ -1,6 +1,7 @@ binaries = ["kubectl-krew"] env = { - "KREW_ROOT": "${HERMIT_ENV}/.hermit/krew/root", + "KREW_ROOT": "${HERMIT_ENV}/.hermit/krew", + "PATH": "${HERMIT_ENV}/.hermit/krew/bin:$PATH", } on "unpack" {