From 09db10fdf20e5c3f4c16ba7eeeb64f120b6d3a17 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Tue, 1 Dec 2020 23:24:41 +0200
Subject: [PATCH] Move the Helm plugin installation from the Makefile to the
 Git hook.

Same as the Vagrant plugins, this is really inside the home directory
and not globally installable (like the other binaries in the Makefile).
---
 .githooks/post-merge | 6 ++++++
 Makefile             | 7 +------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/.githooks/post-merge b/.githooks/post-merge
index 0db86c7..5769e82 100755
--- a/.githooks/post-merge
+++ b/.githooks/post-merge
@@ -29,3 +29,9 @@ then
         vagrant plugin list | grep -qw "$plugin" || vagrant plugin install "$plugin" || true
     done
 fi
+if command -v helm > /dev/null
+then
+    echo Installing Hem plugins >&2
+    helm plugin remove diff
+    helm plugin install https://github.com/databus23/helm-diff --version master
+fi
diff --git a/Makefile b/Makefile
index 30a6b4a..44fc3e2 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ ansible-local = ansible localhost -c local -i localhost, -e "ansible_python_inte
 all: binaries vendored generated
 vendored: .config/pythonrc.py .bash_completion.d/aws .bash_completion.d/docker-compose .bash_completion.d/docker-machine.bash .bash_completion.d/docker-machine.bash .travis/travis.sh .bash_completion.d/molecule Documents/bin/rabbitmqadmin .bash_completion.d/toolbox
 generated: .ssh/config .bash_completion.d/helm .bash_completion.d/kops .bash_completion.d/kubectl .bash_completion.d/kompose .bash_completion.d/minikube .bash_completion.d/pipenv .bash_completion.d/pandoc .bash_completion.d/skaffold .bash_completion.d/rabbitmqadmin .ssh/localhost .ssh/localhost.pub .ssh/authorized_keys .bash_completion.d/minishift .bash_completion.d/oc .bash_completion.d/poetry
-binaries: $(DESTDIR)/share/bfg/bfg.jar $(DESTDIR)/bin/rke $(DESTDIR)/bin/docker-machine $(DESTDIR)/bin/packer $(DESTDIR)/bin/terraform $(DESTDIR)/bin/vault $(DESTDIR)/bin/kubectl $(DESTDIR)/bin/kops $(DESTDIR)/bin/kompose $(DESTDIR)/bin/minikube $(DESTDIR)/bin/docker-machine-driver-kvm2 $(DESTDIR)/bin/kustomize $(DESTDIR)/bin/pack $(DESTDIR)/bin/skaffold $(DESTDIR)/bin/minishift $(DESTDIR)/bin/oc $(DESTDIR)/bin/docker-machine-driver-kvm $(HELM_HOME)/plugins/helm-diff/bin/diff $(DESTDIR)/bin/gomplate $(DESTDIR)/bin/envconsul
+binaries: $(DESTDIR)/share/bfg/bfg.jar $(DESTDIR)/bin/rke $(DESTDIR)/bin/docker-machine $(DESTDIR)/bin/packer $(DESTDIR)/bin/terraform $(DESTDIR)/bin/vault $(DESTDIR)/bin/kubectl $(DESTDIR)/bin/kops $(DESTDIR)/bin/kompose $(DESTDIR)/bin/minikube $(DESTDIR)/bin/docker-machine-driver-kvm2 $(DESTDIR)/bin/kustomize $(DESTDIR)/bin/pack $(DESTDIR)/bin/skaffold $(DESTDIR)/bin/minishift $(DESTDIR)/bin/oc $(DESTDIR)/bin/docker-machine-driver-kvm $(DESTDIR)/bin/gomplate $(DESTDIR)/bin/envconsul
 
 
 ## Binary files
@@ -116,11 +116,6 @@ $(DESTDIR)/bin/docker-machine-driver-kvm:
 	-$(download) https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-ubuntu16.04
 	-chmod +x $@
 
-$(HELM_HOME)/plugins/helm-diff/bin/diff: $(DESTDIR)/bin/helm
-	mkdir -p $(HELM_HOME)/plugins
-	-helm plugin remove diff
-	-$(DESTDIR)/bin/helm plugin install https://github.com/databus23/helm-diff --version master
-
 $(DESTDIR)/bin/gomplate:
 	mkdir -p $$(dirname $@)
 	-$(download) https://github.com/hairyhenderson/gomplate/releases/download/v3.5.0/gomplate_$(goos)-$(goarch)
-- 
GitLab