From d0586172aa4bd7e02a98f98b942b0fa42aaa6c3a Mon Sep 17 00:00:00 2001 From: vyshakhp Date: Tue, 17 Jul 2018 15:08:15 +0530 Subject: [PATCH] moved the helm plugin to this project to manage it easily --- .gitignore | 1 + Makefile | 7 +++++-- plugin-release.sh | 14 ++++++++++++++ plugin/plugin.yaml | 8 ++++++++ plugin/run.sh | 3 +++ 5 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 plugin-release.sh create mode 100644 plugin/plugin.yaml create mode 100644 plugin/run.sh diff --git a/.gitignore b/.gitignore index cca2f85..5caa747 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ *.out bin/ +.DS_Store diff --git a/Makefile b/Makefile index f8c4112..5441c1a 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ fmt: @([[ ! -z "$(FORMATTED)" ]] && printf "Fixed unformatted files:\n$(FORMATTED)") || true clean: - rm -rf build release + rm -rf build release bin linux-amd64: CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=amd64 $(GO) build -ldflags $(BUILDFLAGS) -o bin/$(NAME).linux.amd64 $(MAIN_GO) @@ -49,7 +49,10 @@ windows-386: .PHONY: release clean -release-all: linux-amd64 linux-386 darwin-amd64 darwin-386 windows-amd64 windows-386 +release-all: linux-amd64 linux-386 darwin-amd64 darwin-386 + +release-plugin: release-all + sh plugin-release.sh FGT := $(GOPATH)/bin/fgt $(FGT): diff --git a/plugin-release.sh b/plugin-release.sh new file mode 100644 index 0000000..0e2c3e4 --- /dev/null +++ b/plugin-release.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +rm -rf temp +mkdir temp +cp plugin/* temp/ +cd temp + +cp ../bin/helmez-bin.linux.amd64 ./helmez.bin && tar -czvf ../bin/helmez.linux.amd64.tgz plugin.yaml run.sh helmez.bin +cp ../bin/helmez-bin.linux.386 ./helmez.bin && tar -czvf ../bin/helmez.linux.386.tgz plugin.yaml run.sh helmez.bin +cp ../bin/helmez-bin.darwin.amd64 ./helmez.bin && tar -czvf ../bin/helmez.darwin.amd64.tgz plugin.yaml run.sh helmez.bin +cp ../bin/helmez-bin.darwin.386 ./helmez.bin && tar -czvf ../bin/helmez.darwin.386.tgz plugin.yaml run.sh helmez.bin + +cd ../ +rm -rf temp \ No newline at end of file diff --git a/plugin/plugin.yaml b/plugin/plugin.yaml new file mode 100644 index 0000000..c53ea8b --- /dev/null +++ b/plugin/plugin.yaml @@ -0,0 +1,8 @@ +name: "helmez" +version: "0.1.2" +usage: "Integrate helmez tools with Helm" +description: |- + This plugin provides helmez services to Helm. +ignoreFlags: false +useTunnel: false +command: "sh -c $HELM_PLUGIN_DIR/run.sh" \ No newline at end of file diff --git a/plugin/run.sh b/plugin/run.sh new file mode 100644 index 0000000..859aafe --- /dev/null +++ b/plugin/run.sh @@ -0,0 +1,3 @@ +#!/bin/sh +chmod +x $HELM_PLUGIN_DIR/helmez.bin +$HELM_PLUGIN_DIR/helmez.bin \ No newline at end of file