From ccafaa1d8daf618677c56930f08e5cadc9ba1d1b Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Tue, 7 Mar 2017 19:51:42 -0700 Subject: [PATCH] Update versioning based on @databus23 's Makefile. --- .gitignore | 1 + Makefile | 7 +++++-- glide.lock | 6 +++--- plugin.yaml | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index fea154e..d71fe9e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ _scratch tpl vendor/ +_dist/ diff --git a/Makefile b/Makefile index f3f035f..ee378e4 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ HELM_HOME ?= $(shell helm home) HAS_GLIDE := $(shell command -v glide;) +VERSION := $(shell sed -n -e 's/version:[ "]*\([^"]*\).*/\1/p' plugin.yaml) +DIST := $(CURDIR)/_dist .PHONY: install install: bootstrap build @@ -13,10 +15,11 @@ build: .PHONY: dist dist: + mkdir -p $(DIST) GOOS=linux GOARCH=amd64 go build -o tpl ./main.go - tar -zcvf helm-template-linux.tgz tpl README.md LICENSE.txt plugin.yaml + tar -zcvf $(DIST)/helm-template-linux-$(VERSION).tgz tpl README.md LICENSE.txt plugin.yaml GOOS=darwin GOARCH=amd64 go build -o tpl ./main.go - tar -zcvf helm-template-macos.tgz tpl README.md LICENSE.txt plugin.yaml + tar -zcvf $(DIST)/helm-template-macos-$(VERSION).tgz tpl README.md LICENSE.txt plugin.yaml .PHONY: bootstrap diff --git a/glide.lock b/glide.lock index 1ad7a3e..f2949d6 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ hash: fb296386508414b5afa66ba325fcd951dabdb14cde8c207a8f84e08d00c9f550 -updated: 2017-02-25T10:24:21.847168-07:00 +updated: 2017-03-07T19:51:00.040731132-07:00 imports: - name: github.com/aokoli/goutils version: 9c37978a95bd5c709a15883b6242714ea6709e64 @@ -50,7 +50,7 @@ imports: - name: gopkg.in/yaml.v2 version: a83829b6f1293c91addabc89d0571c246397bbf4 - name: k8s.io/helm - version: db531fd75fb2a1fb0841a98d9e55c58c21f70f4c + version: 1b330722aafcb8123114ae51f69d1e884a326f3e subpackages: - cmd/helm/strvals - pkg/chartutil @@ -60,7 +60,7 @@ imports: - pkg/proto/hapi/version - pkg/timeconv - name: k8s.io/kubernetes - version: e9eeec655e7fdee50d4e19200f9707d1cd4a3371 + version: 00a1fb254bd8e5235575fba1398b958943e39078 subpackages: - pkg/api - pkg/api/errors diff --git a/plugin.yaml b/plugin.yaml index ff952fd..3806298 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -1,7 +1,7 @@ name: "template" # Version is the version of Helm plus the number of official builds for this # plugin -version: "2.1.3+1" +version: "2.2.2+1" usage: "render templates on the local client" description: "Render templates on the local client." command: "$HELM_PLUGIN_DIR/tpl"