Skip to content

Commit

Permalink
Fix(version): ignore commit if unknown (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
xjasonlyu committed Aug 7, 2024
1 parent 3f47c1b commit c432f7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@ func init() {

// BuildString returns hyphen joined version and commit string.
func BuildString() string {
if GitCommit == Unknown {
return Version
}
return fmt.Sprintf("v%s-%s", Version, GitCommit)
}

0 comments on commit c432f7a

Please sign in to comment.