From c9c95ea148379e8de4376dd8c967cafa6d8f7329 Mon Sep 17 00:00:00 2001 From: Taylor Thomas Date: Wed, 7 Aug 2019 12:08:08 -0600 Subject: [PATCH] ref(*): Moves packages to internal These packages are generally used only for logic inside of Helm and can later be re-exported as needed Signed-off-by: Taylor Thomas --- cmd/helm/template.go | 7 +- {pkg => internal}/ignore/doc.go | 2 +- {pkg => internal}/ignore/rules.go | 0 {pkg => internal}/ignore/rules_test.go | 0 {pkg => internal}/ignore/testdata/.helmignore | 0 {pkg => internal}/ignore/testdata/.joonix | 0 {pkg => internal}/ignore/testdata/a.txt | 0 {pkg => internal}/ignore/testdata/cargo/a.txt | 0 {pkg => internal}/ignore/testdata/cargo/b.txt | 0 {pkg => internal}/ignore/testdata/cargo/c.txt | 0 {pkg => internal}/ignore/testdata/helm.txt | 0 {pkg => internal}/ignore/testdata/mast/a.txt | 0 {pkg => internal}/ignore/testdata/mast/b.txt | 0 {pkg => internal}/ignore/testdata/mast/c.txt | 0 {pkg => internal}/ignore/testdata/rudder.txt | 0 .../ignore/testdata/templates/.dotfile | 0 {pkg => internal}/ignore/testdata/tiller.txt | 0 {pkg => internal}/resolver/resolver.go | 0 {pkg => internal}/resolver/resolver_test.go | 0 .../repository/kubernetes-charts-index.yaml | 0 {pkg => internal}/sympath/walk.go | 4 +- {pkg => internal}/sympath/walk_test.go | 4 +- {pkg => internal}/tlsutil/cfg.go | 0 {pkg => internal}/tlsutil/tls.go | 0 {pkg => internal}/tlsutil/tlsutil_test.go | 0 {pkg => internal}/urlutil/urlutil.go | 0 {pkg => internal}/urlutil/urlutil_test.go | 0 internal/version/version.go | 18 +++-- pkg/action/install.go | 3 +- pkg/chart/loader/directory.go | 4 +- .../doc.go => chartutil/compatible.go} | 20 +++++- pkg/{version => chartutil}/compatible_test.go | 25 +------ pkg/chartutil/dependencies.go | 5 +- pkg/chartutil/dependencies_test.go | 5 +- pkg/downloader/chart_downloader.go | 2 +- pkg/downloader/manager.go | 4 +- pkg/getter/httpgetter.go | 4 +- pkg/repo/index.go | 2 +- pkg/version/compatible.go | 65 ------------------- pkg/version/version.go | 29 --------- 40 files changed, 54 insertions(+), 149 deletions(-) rename {pkg => internal}/ignore/doc.go (97%) rename {pkg => internal}/ignore/rules.go (100%) rename {pkg => internal}/ignore/rules_test.go (100%) rename {pkg => internal}/ignore/testdata/.helmignore (100%) rename {pkg => internal}/ignore/testdata/.joonix (100%) rename {pkg => internal}/ignore/testdata/a.txt (100%) rename {pkg => internal}/ignore/testdata/cargo/a.txt (100%) rename {pkg => internal}/ignore/testdata/cargo/b.txt (100%) rename {pkg => internal}/ignore/testdata/cargo/c.txt (100%) rename {pkg => internal}/ignore/testdata/helm.txt (100%) rename {pkg => internal}/ignore/testdata/mast/a.txt (100%) rename {pkg => internal}/ignore/testdata/mast/b.txt (100%) rename {pkg => internal}/ignore/testdata/mast/c.txt (100%) rename {pkg => internal}/ignore/testdata/rudder.txt (100%) rename {pkg => internal}/ignore/testdata/templates/.dotfile (100%) rename {pkg => internal}/ignore/testdata/tiller.txt (100%) rename {pkg => internal}/resolver/resolver.go (100%) rename {pkg => internal}/resolver/resolver_test.go (100%) rename {pkg => internal}/resolver/testdata/helm/repository/kubernetes-charts-index.yaml (100%) rename {pkg => internal}/sympath/walk.go (96%) rename {pkg => internal}/sympath/walk_test.go (95%) rename {pkg => internal}/tlsutil/cfg.go (100%) rename {pkg => internal}/tlsutil/tls.go (100%) rename {pkg => internal}/tlsutil/tlsutil_test.go (100%) rename {pkg => internal}/urlutil/urlutil.go (100%) rename {pkg => internal}/urlutil/urlutil_test.go (100%) rename pkg/{version/doc.go => chartutil/compatible.go} (56%) rename pkg/{version => chartutil}/compatible_test.go (65%) delete mode 100644 pkg/version/compatible.go delete mode 100644 pkg/version/version.go diff --git a/cmd/helm/template.go b/cmd/helm/template.go index babfe0eac..52594951d 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -31,10 +31,9 @@ import ( const templateDesc = ` Render chart templates locally and display the output. -This does not require Helm. However, any values that would normally be -looked up or retrieved in-cluster will be faked locally. Additionally, none -of the server-side testing of chart validity (e.g. whether an API is supported) -is done. +Any values that would normally be looked up or retrieved in-cluster will be +faked locally. Additionally, none of the server-side testing of chart validity +(e.g. whether an API is supported) is done. ` func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { diff --git a/pkg/ignore/doc.go b/internal/ignore/doc.go similarity index 97% rename from pkg/ignore/doc.go rename to internal/ignore/doc.go index 770200ce3..112f77e7b 100644 --- a/pkg/ignore/doc.go +++ b/internal/ignore/doc.go @@ -64,4 +64,4 @@ Notable differences from .gitignore: - The evaluation of escape sequences has not been tested for compatibility - There is no support for '\!' as a special leading sequence. */ -package ignore // import "helm.sh/helm/pkg/ignore" +package ignore // import "helm.sh/helm/internal/ignore" diff --git a/pkg/ignore/rules.go b/internal/ignore/rules.go similarity index 100% rename from pkg/ignore/rules.go rename to internal/ignore/rules.go diff --git a/pkg/ignore/rules_test.go b/internal/ignore/rules_test.go similarity index 100% rename from pkg/ignore/rules_test.go rename to internal/ignore/rules_test.go diff --git a/pkg/ignore/testdata/.helmignore b/internal/ignore/testdata/.helmignore similarity index 100% rename from pkg/ignore/testdata/.helmignore rename to internal/ignore/testdata/.helmignore diff --git a/pkg/ignore/testdata/.joonix b/internal/ignore/testdata/.joonix similarity index 100% rename from pkg/ignore/testdata/.joonix rename to internal/ignore/testdata/.joonix diff --git a/pkg/ignore/testdata/a.txt b/internal/ignore/testdata/a.txt similarity index 100% rename from pkg/ignore/testdata/a.txt rename to internal/ignore/testdata/a.txt diff --git a/pkg/ignore/testdata/cargo/a.txt b/internal/ignore/testdata/cargo/a.txt similarity index 100% rename from pkg/ignore/testdata/cargo/a.txt rename to internal/ignore/testdata/cargo/a.txt diff --git a/pkg/ignore/testdata/cargo/b.txt b/internal/ignore/testdata/cargo/b.txt similarity index 100% rename from pkg/ignore/testdata/cargo/b.txt rename to internal/ignore/testdata/cargo/b.txt diff --git a/pkg/ignore/testdata/cargo/c.txt b/internal/ignore/testdata/cargo/c.txt similarity index 100% rename from pkg/ignore/testdata/cargo/c.txt rename to internal/ignore/testdata/cargo/c.txt diff --git a/pkg/ignore/testdata/helm.txt b/internal/ignore/testdata/helm.txt similarity index 100% rename from pkg/ignore/testdata/helm.txt rename to internal/ignore/testdata/helm.txt diff --git a/pkg/ignore/testdata/mast/a.txt b/internal/ignore/testdata/mast/a.txt similarity index 100% rename from pkg/ignore/testdata/mast/a.txt rename to internal/ignore/testdata/mast/a.txt diff --git a/pkg/ignore/testdata/mast/b.txt b/internal/ignore/testdata/mast/b.txt similarity index 100% rename from pkg/ignore/testdata/mast/b.txt rename to internal/ignore/testdata/mast/b.txt diff --git a/pkg/ignore/testdata/mast/c.txt b/internal/ignore/testdata/mast/c.txt similarity index 100% rename from pkg/ignore/testdata/mast/c.txt rename to internal/ignore/testdata/mast/c.txt diff --git a/pkg/ignore/testdata/rudder.txt b/internal/ignore/testdata/rudder.txt similarity index 100% rename from pkg/ignore/testdata/rudder.txt rename to internal/ignore/testdata/rudder.txt diff --git a/pkg/ignore/testdata/templates/.dotfile b/internal/ignore/testdata/templates/.dotfile similarity index 100% rename from pkg/ignore/testdata/templates/.dotfile rename to internal/ignore/testdata/templates/.dotfile diff --git a/pkg/ignore/testdata/tiller.txt b/internal/ignore/testdata/tiller.txt similarity index 100% rename from pkg/ignore/testdata/tiller.txt rename to internal/ignore/testdata/tiller.txt diff --git a/pkg/resolver/resolver.go b/internal/resolver/resolver.go similarity index 100% rename from pkg/resolver/resolver.go rename to internal/resolver/resolver.go diff --git a/pkg/resolver/resolver_test.go b/internal/resolver/resolver_test.go similarity index 100% rename from pkg/resolver/resolver_test.go rename to internal/resolver/resolver_test.go diff --git a/pkg/resolver/testdata/helm/repository/kubernetes-charts-index.yaml b/internal/resolver/testdata/helm/repository/kubernetes-charts-index.yaml similarity index 100% rename from pkg/resolver/testdata/helm/repository/kubernetes-charts-index.yaml rename to internal/resolver/testdata/helm/repository/kubernetes-charts-index.yaml diff --git a/pkg/sympath/walk.go b/internal/sympath/walk.go similarity index 96% rename from pkg/sympath/walk.go rename to internal/sympath/walk.go index 756fc74c3..196a6f489 100644 --- a/pkg/sympath/walk.go +++ b/internal/sympath/walk.go @@ -1,6 +1,6 @@ /* -Copyright The Helm Authors.go are held by The Go Authors, 2009 and are provided under -the BSD license. +Copyright (c) for portions of walk.go are held by The Go Authors, 2009 and are +provided under the BSD license. https://github.com/golang/go/blob/master/LICENSE diff --git a/pkg/sympath/walk_test.go b/internal/sympath/walk_test.go similarity index 95% rename from pkg/sympath/walk_test.go rename to internal/sympath/walk_test.go index c7403bcfa..c9364e91a 100644 --- a/pkg/sympath/walk_test.go +++ b/internal/sympath/walk_test.go @@ -1,6 +1,6 @@ /* -Copyright The Helm Authors.go are held by The Go Authors, 2009 and are provided under -the BSD license. +Copyright (c) for portions of walk_test.go are held by The Go Authors, 2009 and are +provided under the BSD license. https://github.com/golang/go/blob/master/LICENSE diff --git a/pkg/tlsutil/cfg.go b/internal/tlsutil/cfg.go similarity index 100% rename from pkg/tlsutil/cfg.go rename to internal/tlsutil/cfg.go diff --git a/pkg/tlsutil/tls.go b/internal/tlsutil/tls.go similarity index 100% rename from pkg/tlsutil/tls.go rename to internal/tlsutil/tls.go diff --git a/pkg/tlsutil/tlsutil_test.go b/internal/tlsutil/tlsutil_test.go similarity index 100% rename from pkg/tlsutil/tlsutil_test.go rename to internal/tlsutil/tlsutil_test.go diff --git a/pkg/urlutil/urlutil.go b/internal/urlutil/urlutil.go similarity index 100% rename from pkg/urlutil/urlutil.go rename to internal/urlutil/urlutil.go diff --git a/pkg/urlutil/urlutil_test.go b/internal/urlutil/urlutil_test.go similarity index 100% rename from pkg/urlutil/urlutil_test.go rename to internal/urlutil/urlutil_test.go diff --git a/internal/version/version.go b/internal/version/version.go index 23f38500c..d7caa11f5 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -19,8 +19,6 @@ package version // import "helm.sh/helm/internal/version" import ( "flag" "runtime" - - hversion "helm.sh/helm/pkg/version" ) var ( @@ -41,6 +39,18 @@ var ( gitTreeState = "" ) +// BuildInfo describes the compile time information. +type BuildInfo struct { + // Version is the current semver. + Version string `json:"version,omitempty"` + // GitCommit is the git sha1. + GitCommit string `json:"git_commit,omitempty"` + // GitTreeState is the state of the git tree. + GitTreeState string `json:"git_tree_state,omitempty"` + // GoVersion is the version of the Go compiler used. + GoVersion string `json:"go_version,omitempty"` +} + // GetVersion returns the semver string of the version func GetVersion() string { if metadata == "" { @@ -50,8 +60,8 @@ func GetVersion() string { } // Get returns build info -func Get() hversion.BuildInfo { - v := hversion.BuildInfo{ +func Get() BuildInfo { + v := BuildInfo{ Version: GetVersion(), GitCommit: gitCommit, GitTreeState: gitTreeState, diff --git a/pkg/action/install.go b/pkg/action/install.go index f579a1579..db287d0bc 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -44,7 +44,6 @@ import ( "helm.sh/helm/pkg/repo" "helm.sh/helm/pkg/storage" "helm.sh/helm/pkg/storage/driver" - "helm.sh/helm/pkg/version" ) // releaseNameMaxLen is the maximum length of a release name. @@ -340,7 +339,7 @@ func (c *Configuration) renderResources(ch *chart.Chart, values chartutil.Values } if ch.Metadata.KubeVersion != "" { - if !version.IsCompatibleRange(ch.Metadata.KubeVersion, caps.KubeVersion.String()) { + if !chartutil.IsCompatibleRange(ch.Metadata.KubeVersion, caps.KubeVersion.String()) { return hs, b, "", errors.Errorf("chart requires kubernetesVersion: %s which is incompatible with Kubernetes %s", ch.Metadata.KubeVersion, caps.KubeVersion.String()) } } diff --git a/pkg/chart/loader/directory.go b/pkg/chart/loader/directory.go index 921b5a166..ddfc0d4c9 100644 --- a/pkg/chart/loader/directory.go +++ b/pkg/chart/loader/directory.go @@ -24,9 +24,9 @@ import ( "github.com/pkg/errors" + "helm.sh/helm/internal/ignore" + "helm.sh/helm/internal/sympath" "helm.sh/helm/pkg/chart" - "helm.sh/helm/pkg/ignore" - "helm.sh/helm/pkg/sympath" ) // DirLoader loads a chart from a directory diff --git a/pkg/version/doc.go b/pkg/chartutil/compatible.go similarity index 56% rename from pkg/version/doc.go rename to pkg/chartutil/compatible.go index 4aca960d1..4bcc6719e 100644 --- a/pkg/version/doc.go +++ b/pkg/chartutil/compatible.go @@ -14,5 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package version represents the current version of the project. -package version // import "helm.sh/helm/pkg/version" +package chartutil + +import "github.com/Masterminds/semver" + +// IsCompatibleRange compares a version to a constraint. +// It returns true if the version matches the constraint, and false in all other cases. +func IsCompatibleRange(constraint, ver string) bool { + sv, err := semver.NewVersion(ver) + if err != nil { + return false + } + + c, err := semver.NewConstraint(constraint) + if err != nil { + return false + } + return c.Check(sv) +} diff --git a/pkg/version/compatible_test.go b/pkg/chartutil/compatible_test.go similarity index 65% rename from pkg/version/compatible_test.go rename to pkg/chartutil/compatible_test.go index e68e6f1c3..df7be6161 100644 --- a/pkg/version/compatible_test.go +++ b/pkg/chartutil/compatible_test.go @@ -15,33 +15,10 @@ limitations under the License. */ // Package version represents the current version of the project. -package version // import "helm.sh/helm/pkg/version" +package chartutil import "testing" -func TestIsCompatible(t *testing.T) { - tests := []struct { - client string - server string - expected bool - }{ - {"v2.0.0-alpha.4", "v2.0.0-alpha.4", true}, - {"v2.0.0-alpha.3", "v2.0.0-alpha.4", false}, - {"v2.0.0", "v2.0.0-alpha.4", false}, - {"v2.0.0-alpha.4", "v2.0.0", false}, - {"v2.0.0", "v2.0.1", true}, - {"v2.0.1", "v2.0.0", true}, - {"v2.0.0", "v2.1.1", true}, - {"v2.1.0", "v2.0.1", false}, - } - - for _, tt := range tests { - if IsCompatible(tt.client, tt.server) != tt.expected { - t.Errorf("expected client(%s) and server(%s) to be %v", tt.client, tt.server, tt.expected) - } - } -} - func TestIsCompatibleRange(t *testing.T) { tests := []struct { constraint string diff --git a/pkg/chartutil/dependencies.go b/pkg/chartutil/dependencies.go index e362e35ff..6b644edda 100644 --- a/pkg/chartutil/dependencies.go +++ b/pkg/chartutil/dependencies.go @@ -20,7 +20,6 @@ import ( "strings" "helm.sh/helm/pkg/chart" - "helm.sh/helm/pkg/version" ) // ProcessDependencies checks through this chart's dependencies, processing accordingly. @@ -113,7 +112,7 @@ func getAliasDependency(charts []*chart.Chart, dep *chart.Dependency) *chart.Cha if c.Name() != dep.Name { continue } - if !version.IsCompatibleRange(dep.Version, c.Metadata.Version) { + if !IsCompatibleRange(dep.Version, c.Metadata.Version) { continue } @@ -144,7 +143,7 @@ func processDependencyEnabled(c *chart.Chart, v map[string]interface{}) error { Loop: for _, existing := range c.Dependencies() { for _, req := range c.Metadata.Dependencies { - if existing.Name() == req.Name && version.IsCompatibleRange(req.Version, existing.Metadata.Version) { + if existing.Name() == req.Name && IsCompatibleRange(req.Version, existing.Metadata.Version) { continue Loop } } diff --git a/pkg/chartutil/dependencies_test.go b/pkg/chartutil/dependencies_test.go index 629856ccd..edc2252a7 100644 --- a/pkg/chartutil/dependencies_test.go +++ b/pkg/chartutil/dependencies_test.go @@ -23,7 +23,6 @@ import ( "helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart/loader" - "helm.sh/helm/pkg/version" ) func loadChart(t *testing.T, path string) *chart.Chart { @@ -258,7 +257,7 @@ func TestGetAliasDependency(t *testing.T) { } if req[0].Version != "" { - if !version.IsCompatibleRange(req[0].Version, aliasChart.Metadata.Version) { + if !IsCompatibleRange(req[0].Version, aliasChart.Metadata.Version) { t.Fatalf("dependency chart version is not in the compatible range") } } @@ -270,7 +269,7 @@ func TestGetAliasDependency(t *testing.T) { } req[0].Version = "something else which is not in the compatible range" - if version.IsCompatibleRange(req[0].Version, aliasChart.Metadata.Version) { + if IsCompatibleRange(req[0].Version, aliasChart.Metadata.Version) { t.Fatalf("dependency chart version which is not in the compatible range should cause a failure other than a success ") } } diff --git a/pkg/downloader/chart_downloader.go b/pkg/downloader/chart_downloader.go index ea792626f..0135cb608 100644 --- a/pkg/downloader/chart_downloader.go +++ b/pkg/downloader/chart_downloader.go @@ -26,11 +26,11 @@ import ( "github.com/pkg/errors" + "helm.sh/helm/internal/urlutil" "helm.sh/helm/pkg/getter" "helm.sh/helm/pkg/helmpath" "helm.sh/helm/pkg/provenance" "helm.sh/helm/pkg/repo" - "helm.sh/helm/pkg/urlutil" ) // VerificationStrategy describes a strategy for determining whether to verify a chart. diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index d33d587ca..13fdc4932 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -30,14 +30,14 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/yaml" + "helm.sh/helm/internal/resolver" + "helm.sh/helm/internal/urlutil" "helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart/loader" "helm.sh/helm/pkg/chartutil" "helm.sh/helm/pkg/getter" "helm.sh/helm/pkg/helmpath" "helm.sh/helm/pkg/repo" - "helm.sh/helm/pkg/resolver" - "helm.sh/helm/pkg/urlutil" ) // Manager handles the lifecycle of fetching, resolving, and storing dependencies. diff --git a/pkg/getter/httpgetter.go b/pkg/getter/httpgetter.go index 105164333..4081c1278 100644 --- a/pkg/getter/httpgetter.go +++ b/pkg/getter/httpgetter.go @@ -23,9 +23,9 @@ import ( "github.com/pkg/errors" + "helm.sh/helm/internal/tlsutil" + "helm.sh/helm/internal/urlutil" "helm.sh/helm/internal/version" - "helm.sh/helm/pkg/tlsutil" - "helm.sh/helm/pkg/urlutil" ) // HTTPGetter is the efault HTTP(/S) backend handler diff --git a/pkg/repo/index.go b/pkg/repo/index.go index eeb7cff74..164c2a511 100644 --- a/pkg/repo/index.go +++ b/pkg/repo/index.go @@ -31,10 +31,10 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/yaml" + "helm.sh/helm/internal/urlutil" "helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart/loader" "helm.sh/helm/pkg/provenance" - "helm.sh/helm/pkg/urlutil" ) var indexPath = "index.yaml" diff --git a/pkg/version/compatible.go b/pkg/version/compatible.go deleted file mode 100644 index 13badeade..000000000 --- a/pkg/version/compatible.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright The Helm Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package version // import "helm.sh/helm/pkg/version" - -import ( - "fmt" - "strings" - - "github.com/Masterminds/semver" -) - -// IsCompatible tests if a client and server version are compatible. -func IsCompatible(client, server string) bool { - if isUnreleased(client) || isUnreleased(server) { - return true - } - cv, err := semver.NewVersion(client) - if err != nil { - return false - } - sv, err := semver.NewVersion(server) - if err != nil { - return false - } - - constraint := fmt.Sprintf("^%d.%d.x", cv.Major(), cv.Minor()) - if cv.Prerelease() != "" || sv.Prerelease() != "" { - constraint = cv.String() - } - - return IsCompatibleRange(constraint, server) -} - -// IsCompatibleRange compares a version to a constraint. -// It returns true if the version matches the constraint, and false in all other cases. -func IsCompatibleRange(constraint, ver string) bool { - sv, err := semver.NewVersion(ver) - if err != nil { - return false - } - - c, err := semver.NewConstraint(constraint) - if err != nil { - return false - } - return c.Check(sv) -} - -func isUnreleased(v string) bool { - return strings.HasSuffix(v, "unreleased") -} diff --git a/pkg/version/version.go b/pkg/version/version.go deleted file mode 100644 index 036e723da..000000000 --- a/pkg/version/version.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright The Helm Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package version // import "helm.sh/helm/pkg/version" - -// BuildInfo describes the compile time information. -type BuildInfo struct { - // Version is the current semver. - Version string `json:"version,omitempty"` - // GitCommit is the git sha1. - GitCommit string `json:"git_commit,omitempty"` - // GitTreeState is the state of the git tree. - GitTreeState string `json:"git_tree_state,omitempty"` - // GoVersion is the version of the Go compiler used. - GoVersion string `json:"go_version,omitempty"` -}