mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
terminal: add commit_hash to --version output
The `commit_hash` field will contain the full commit hash of the commit that build was based on.
This commit is contained in:
parent
e30ac3d0a8
commit
4edaed4297
1 changed files with 5 additions and 4 deletions
|
|
@ -48,12 +48,13 @@ func Version() string {
|
|||
}
|
||||
|
||||
// RichVersion returns the application version as a properly formed string
|
||||
// per the semantic versioning 2.0.0 spec (http://semver.org/), the git tag it
|
||||
// was built on.
|
||||
// per the semantic versioning 2.0.0 spec (http://semver.org/), the git tag and
|
||||
// commit hash it was built on.
|
||||
func RichVersion() string {
|
||||
// Append git tag of current build to version.
|
||||
// Append git tag and commit hash of current build to version.
|
||||
return fmt.Sprintf(
|
||||
"%s commit=%s", semanticVersion(), Commit,
|
||||
"%s commit=%s commit_hash=%s", semanticVersion(), Commit,
|
||||
CommitHash,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue