Skip to content

Commit

Permalink
Merge pull request #14 from mbenabda/prevent_overriding_other_chartfi…
Browse files Browse the repository at this point in the history
…le_keys

[fix #13] Prevent overriding other chartfile keys
  • Loading branch information
mbenabda authored Apr 19, 2020
2 parents f9a3cbc + 7c4e787 commit f8e7775
Show file tree
Hide file tree
Showing 15 changed files with 867 additions and 138 deletions.
44 changes: 28 additions & 16 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,41 @@
# Build customization
before:
hooks:
- go mod download
- go generate ./...
builds:
- binary: local-chart-version
- binary: local-chart-version

ldflags: -s -w -extldflags "-static" -X main.Version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
ldflags: -s -w -extldflags "-static" -X main.Version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}

env:
- CGO_ENABLED=0

env:
- CGO_ENABLED=0
goos:
- linux
- darwin

goos:
- linux
- darwin
goarch:
- amd64

goarch:
- amd64

# Archive customization
archive:
name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
archives:
- name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"

files:
- plugin.yaml
- README.md
- ./docs/**

format: tar.gz
replacements:
386: i386

snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

env_files:
github_token: ~/.github/helm-local-chart-version.token
github_token: ~/.github/helm-local-chart-version.token
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@ pkgs = $(shell go list ./... | grep -v /vendor/ | grep -v /test/)
clean:
rm -rf $(PROJECT_BIN_NAME) ./dist

HAS_GLIDE := $(shell command -v glide;)
HAS_GIT := $(shell command -v git;)
HAS_GORELEASER := $(shell command -v goreleaser;)

.PHONY: bootstrap
bootstrap:
ifndef HAS_GLIDE
go get -u github.com/Masterminds/glide
endif
glide install --strip-vendor
.PHONY: show-version
show-version:
@echo $(VERSION)

.PHONY: gendoc
gendoc: build
Expand All @@ -32,11 +28,14 @@ build: test
go build -i -v -o $(PROJECT_BIN_NAME)

.PHONY: test
test: bootstrap
go test $(pkgs)
test:
go test ./...

.PHONY: build-cross
build-cross: clean test gendoc
ifndef HAS_GORELEASER
$(error You must install goreleaser)
endif
goreleaser --snapshot

.PHONY: install
Expand All @@ -51,7 +50,7 @@ ifndef HAS_GIT
$(error You must install Git)
endif
ifndef HAS_GORELEASER
go get -u github.com/goreleaser/goreleaser
$(error You must install goreleaser)
endif
git tag -a v$(VERSION) -m "release v$(VERSION)"
git push origin v$(VERSION)
Expand Down
2 changes: 1 addition & 1 deletion docs/local-chart-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ Modify the version number of a local helm chart
* [local-chart-version set](local-chart-version_set.md) - Modify a local chart's version number in place
* [local-chart-version version](local-chart-version_version.md) - Print the version of the local-chart-version helm plugin

###### Auto generated by spf13/cobra on 10-Feb-2019
###### Auto generated by spf13/cobra on 19-Apr-2020
2 changes: 1 addition & 1 deletion docs/local-chart-version_bump.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ local-chart-version bump [flags]

* [local-chart-version](local-chart-version.md) -

###### Auto generated by spf13/cobra on 10-Feb-2019
###### Auto generated by spf13/cobra on 19-Apr-2020
2 changes: 1 addition & 1 deletion docs/local-chart-version_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ local-chart-version get [flags]

* [local-chart-version](local-chart-version.md) -

###### Auto generated by spf13/cobra on 10-Feb-2019
###### Auto generated by spf13/cobra on 19-Apr-2020
2 changes: 1 addition & 1 deletion docs/local-chart-version_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ local-chart-version set [flags]

* [local-chart-version](local-chart-version.md) -

###### Auto generated by spf13/cobra on 10-Feb-2019
###### Auto generated by spf13/cobra on 19-Apr-2020
2 changes: 1 addition & 1 deletion docs/local-chart-version_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ local-chart-version version [flags]

* [local-chart-version](local-chart-version.md) -

###### Auto generated by spf13/cobra on 10-Feb-2019
###### Auto generated by spf13/cobra on 19-Apr-2020
57 changes: 0 additions & 57 deletions glide.lock

This file was deleted.

12 changes: 0 additions & 12 deletions glide.yaml

This file was deleted.

51 changes: 51 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
module github.com/mbenabda/helm-local-chart-version

go 1.13

require (
cloud.google.com/go v0.56.0 // indirect
contrib.go.opencensus.io/exporter/ocagent v0.6.0 // indirect
github.com/Azure/azure-pipeline-go v0.2.2 // indirect
github.com/Azure/azure-sdk-for-go v41.2.0+incompatible // indirect
github.com/Azure/go-autorest v14.0.1+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.10.0 // indirect
github.com/Azure/go-autorest/autorest/adal v0.8.3 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 // indirect
github.com/Azure/go-autorest/autorest/to v0.3.0 // indirect
github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
github.com/Masterminds/semver v1.3.1
github.com/Masterminds/semver/v3 v3.1.0 // indirect
github.com/apex/log v1.1.2 // indirect
github.com/aws/aws-sdk-go v1.30.9 // indirect
github.com/cpuguy83/go-md2man v1.0.4 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/golang/protobuf v1.4.0 // indirect
github.com/google/wire v0.4.0 // indirect
github.com/goreleaser/goreleaser v0.131.1 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.14.4 // indirect
github.com/hashicorp/go-retryablehttp v0.6.6 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/krishicks/yaml-patch v0.0.10
github.com/mattn/go-colorable v0.1.6 // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.9.0 // indirect
github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5 // indirect
github.com/shurcooL/sanitized_anchor_name v0.0.0-20151028001915-10ef21a441db // indirect
github.com/spf13/cobra v0.0.2
github.com/spf13/pflag v1.0.1-0.20180220143236-ee5fd03fd6ac // indirect
github.com/ulikunitz/xz v0.5.7 // indirect
github.com/xanzy/go-gitlab v0.31.0 // indirect
golang.org/x/crypto v0.0.0-20200414173820-0848c9571904 // indirect
golang.org/x/sys v0.0.0-20200413165638-669c56c373c4 // indirect
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 // indirect
golang.org/x/tools v0.0.0-20200417140056-c07e33ef3290 // indirect
google.golang.org/api v0.21.0 // indirect
google.golang.org/genproto v0.0.0-20200417142217-fb6d0575620b // indirect
google.golang.org/grpc v1.28.1 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v2 v2.2.8
k8s.io/apimachinery v0.0.0-20180103014849-68f9c3a1feb3 // indirect
k8s.io/helm v2.8.2+incompatible
)
Loading

0 comments on commit f8e7775

Please sign in to comment.