mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loop: 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
cdcacfe753
commit
78c406d67e
1 changed files with 7 additions and 3 deletions
10
version.go
10
version.go
|
|
@ -64,10 +64,14 @@ func Version() string {
|
|||
|
||||
// RichVersion returns the application version as a properly formed string
|
||||
// per the semantic versioning 2.0.0 spec (http://semver.org/), followed by the
|
||||
// most recent git tag the build was built on.
|
||||
// most recent git tag and commit hash the build was built on.
|
||||
func RichVersion() string {
|
||||
// Append the most recent git tag of the current build to version.
|
||||
return fmt.Sprintf("%s commit=%s", semanticVersion(), Commit)
|
||||
// Append the most recent git tag and commit hash of the current build
|
||||
// to version.
|
||||
return fmt.Sprintf(
|
||||
"%s commit=%s commit_hash=%s", semanticVersion(), Commit,
|
||||
CommitHash,
|
||||
)
|
||||
}
|
||||
|
||||
// UserAgent returns the full user agent string that identifies the software
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue