diff --git a/cmd/helm/testdata/output/version-client-shorthand.txt b/cmd/helm/testdata/output/version-client-shorthand.txt index 910493bc4..bbd213ca3 100644 --- a/cmd/helm/testdata/output/version-client-shorthand.txt +++ b/cmd/helm/testdata/output/version-client-shorthand.txt @@ -1 +1 @@ -version.BuildInfo{Version:"v3.3", GitCommit:"", GitTreeState:"", GoVersion:""} +version.BuildInfo{Version:"v3.3.0", GitCommit:"", GitTreeState:"", GoVersion:""} diff --git a/cmd/helm/testdata/output/version-client.txt b/cmd/helm/testdata/output/version-client.txt index 910493bc4..bbd213ca3 100644 --- a/cmd/helm/testdata/output/version-client.txt +++ b/cmd/helm/testdata/output/version-client.txt @@ -1 +1 @@ -version.BuildInfo{Version:"v3.3", GitCommit:"", GitTreeState:"", GoVersion:""} +version.BuildInfo{Version:"v3.3.0", GitCommit:"", GitTreeState:"", GoVersion:""} diff --git a/cmd/helm/testdata/output/version-short.txt b/cmd/helm/testdata/output/version-short.txt index a6c626024..b299be978 100644 --- a/cmd/helm/testdata/output/version-short.txt +++ b/cmd/helm/testdata/output/version-short.txt @@ -1 +1 @@ -v3.3 +v3.3.0 diff --git a/cmd/helm/testdata/output/version-template.txt b/cmd/helm/testdata/output/version-template.txt index 48c6d2b04..34a08a3dd 100644 --- a/cmd/helm/testdata/output/version-template.txt +++ b/cmd/helm/testdata/output/version-template.txt @@ -1 +1 @@ -Version: v3.3 \ No newline at end of file +Version: v3.3.0 \ No newline at end of file diff --git a/cmd/helm/testdata/output/version.txt b/cmd/helm/testdata/output/version.txt index 910493bc4..bbd213ca3 100644 --- a/cmd/helm/testdata/output/version.txt +++ b/cmd/helm/testdata/output/version.txt @@ -1 +1 @@ -version.BuildInfo{Version:"v3.3", GitCommit:"", GitTreeState:"", GoVersion:""} +version.BuildInfo{Version:"v3.3.0", GitCommit:"", GitTreeState:"", GoVersion:""} diff --git a/internal/version/version.go b/internal/version/version.go index 2941bb489..79d5c6a02 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -29,7 +29,7 @@ var ( // // Increment major number for new feature additions and behavioral changes. // Increment minor number for bug fixes and performance enhancements. - version = "v3.3" + version = "v3.3.0" // metadata is extra build time data metadata = "" diff --git a/internal/version/version_test.go b/internal/version/version_test.go new file mode 100644 index 000000000..bd524c28c --- /dev/null +++ b/internal/version/version_test.go @@ -0,0 +1,32 @@ +/* +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 ( + "strings" + "testing" + + "github.com/Masterminds/semver/v3" +) + +func TestVersionSemver(t *testing.T) { + _, err := semver.StrictNewVersion(strings.TrimPrefix(version, "v")) + + if err != nil { + t.Fatalf("The version number %s is not semver compliant", version) + } +} diff --git a/pkg/chartutil/capabilities_test.go b/pkg/chartutil/capabilities_test.go index 66eeee755..dc7a258f7 100644 --- a/pkg/chartutil/capabilities_test.go +++ b/pkg/chartutil/capabilities_test.go @@ -62,7 +62,7 @@ func TestDefaultCapabilities(t *testing.T) { func TestDefaultCapabilitiesHelmVersion(t *testing.T) { hv := DefaultCapabilities.HelmVersion - if hv.Version != "v3.3" { - t.Errorf("Expected default HelmVersion to be v3.3, got %q", hv.Version) + if hv.Version != "v3.3.0" { + t.Errorf("Expected default HelmVersion to be v3.3.0, got %q", hv.Version) } }