From 70d19a81fb598ebdf27a78e31256712da89b83d6 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 3 May 2019 21:39:34 +0300
Subject: [PATCH] Added gomplate and helm-diff.

---
 .bashrc                |  1 +
 .githooks/post-merge   |  2 ++
 .helm/plugins/.gitkeep |  0
 Makefile               | 11 ++++++++++-
 4 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 .helm/plugins/.gitkeep

diff --git a/.bashrc b/.bashrc
index 7f91be6..5af1b47 100644
--- a/.bashrc
+++ b/.bashrc
@@ -48,6 +48,7 @@ export LESS_TERMCAP_se=$'\E[0m'
 # Underline (dark grey).
 export LESS_TERMCAP_us=$'\E[01;32m'
 export LESS_TERMCAP_ue=$'\E[0m'
+export HELM_HOME="$HOME/.helm"
 
 alias ll='ls -lha'
 alias la='ls -A'
diff --git a/.githooks/post-merge b/.githooks/post-merge
index ed930bc..4d39554 100755
--- a/.githooks/post-merge
+++ b/.githooks/post-merge
@@ -1,5 +1,7 @@
 #!/bin/sh
 set -eu
+# shellcheck disable=SC1090
+. ~/.bashrc
 cd "$(git rev-parse --show-toplevel)"
 echo Installing Golang apps >> /dev/stderr
 go get github.com/giantswarm/semver-bump || true
diff --git a/.helm/plugins/.gitkeep b/.helm/plugins/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/Makefile b/Makefile
index 438973f..af7cb19 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ download = $(curl) --output $@
 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/google-cloud-sdk
 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
-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
+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
 
 
 ## Binary files
@@ -115,6 +115,15 @@ $(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
+	$(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.4.0/gomplate_$(goos)-$(goarch)
+	-chmod +x $@
+
 
 ## Vendored files
 
-- 
GitLab