Skip to content

Commit

Permalink
Removed GitDirty as already processed in make install target
Browse files Browse the repository at this point in the history
  • Loading branch information
ehearneRedHat committed Jun 11, 2024
1 parent 6c3d8c4 commit 7176e62
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,15 @@ limitations under the License.
*/
package version

import "fmt"

var (
// This variable shows the user any additional changes to files made that aren't on the branch.
GitDirty string
// This variable shows the commit hash of the repo so they can confirm they are on latest or specific version of the branch.
GitHash string
// This variable is dependent on what the current release is e.g. if it is v0.2.3 then this variable, outside of releases, will be v0.2.4-dev .
Version = "v0.2.4-dev"
)

func init() {
if GitDirty != "" && GitHash != "" {
Version += " (" + GitHash + " - " + GitDirty + ")"
} else if GitDirty == "" {
Version += " (" + GitHash + ")"
}
Version = fmt.Sprintf("%s (%s)", Version, GitHash)
}

0 comments on commit 7176e62

Please sign in to comment.