Makefile, params: fix git commit in bor version cmd (#835)

This commit is contained in:
Manav Darji 2023-04-26 15:00:21 +05:30 committed by GitHub
parent 6dee9b5f40
commit 61d35d4980
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -17,7 +17,7 @@ GIT_COMMIT ?= $(shell git rev-list -1 HEAD)
PACKAGE = github.com/ethereum/go-ethereum
GO_FLAGS += -buildvcs=false
GO_LDFLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} "
GO_LDFLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT}"
TESTALL = $$(go list ./... | grep -v go-ethereum/cmd/)
TESTE2E = ./tests/...

View file

@ -21,13 +21,14 @@ import (
)
const (
GitCommit = ""
VersionMajor = 0 // Major version component of the current release
VersionMinor = 3 // Minor version component of the current release
VersionPatch = 9 // Patch version component of the current release
VersionMeta = "beta" // Version metadata to append to the version string
)
var GitCommit string
// Version holds the textual version string.
var Version = func() string {
return fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch)
@ -48,7 +49,7 @@ var VersionWithMetaCommitDetails = func() string {
if VersionMeta != "" {
v += "-" + VersionMeta
}
v_git := fmt.Sprintf("Version : %s\nGitCommit : %s\n", v, GitCommit)
v_git := fmt.Sprintf("Version: %s\nGitCommit: %s", v, GitCommit)
return v_git
}()