github.com/umeshredd/helm@v3.0.0-alpha.1+incompatible/internal/version/version.go (about) 1 /* 2 Copyright The Helm Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package version // import "helm.sh/helm/internal/version" 18 19 import ( 20 hversion "helm.sh/helm/pkg/version" 21 ) 22 23 var ( 24 // version is the current version of the Helm. 25 // Update this whenever making a new release. 26 // The version is of the format Major.Minor.Patch[-Prerelease][+BuildMetadata] 27 // 28 // Increment major number for new feature additions and behavioral changes. 29 // Increment minor number for bug fixes and performance enhancements. 30 // Increment patch number for critical fixes to existing releases. 31 version = "v3.0" 32 33 // metadata is extra build time data 34 metadata = "unreleased" 35 // gitCommit is the git sha1 36 gitCommit = "" 37 // gitTreeState is the state of the git tree 38 gitTreeState = "" 39 ) 40 41 // GetVersion returns the semver string of the version 42 func GetVersion() string { 43 if metadata == "" { 44 return version 45 } 46 return version + "+" + metadata 47 } 48 49 // Get returns build info 50 func Get() hversion.BuildInfo { 51 return hversion.BuildInfo{ 52 Version: GetVersion(), 53 GitCommit: gitCommit, 54 GitTreeState: gitTreeState, 55 } 56 }