mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loop: add the commit_hash to GetInfoResponse, change version semantics
With this commit we extend GetinfoResponse with the strict commit hash (which also includes whether the build tree was clean or dirty).
This commit is contained in:
parent
f72cdde58f
commit
9a6266f9f7
7 changed files with 725 additions and 692 deletions
16
version.go
16
version.go
|
|
@ -45,13 +45,25 @@ const (
|
|||
var AgentName = defaultAgentName
|
||||
|
||||
// Version returns the application version as a properly formed string per the
|
||||
// semantic versioning 2.0.0 spec (http://semver.org/) and the commit it was
|
||||
// built on.
|
||||
// semantic versioning 2.0.0 spec (http://semver.org/).
|
||||
func Version() string {
|
||||
// Append commit hash of current build to version.
|
||||
return semanticVersion()
|
||||
}
|
||||
|
||||
// RichVersion returns the application version as a properly formed string
|
||||
// per the semantic versioning 2.0.0 spec (http://semver.org/) and the commit
|
||||
// it was built on.
|
||||
func RichVersion() string {
|
||||
// Append commit hash of current build to version.
|
||||
return fmt.Sprintf("%s commit=%s", semanticVersion(), Commit)
|
||||
}
|
||||
|
||||
// CommitHash returns the commit hash of the current build.
|
||||
func CommitHash() string {
|
||||
return Commit
|
||||
}
|
||||
|
||||
// UserAgent returns the full user agent string that identifies the software
|
||||
// that is submitting swaps to the loop server.
|
||||
func UserAgent(initiator string) string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue