cmd/geth, cmd/mist: use gitCommit in node name

This commit is contained in:
Felix Lange
2015-04-28 13:14:53 +02:00
parent 71c28cfb0c
commit eb5e43022e
2 changed files with 36 additions and 15 deletions

View File

@ -41,6 +41,9 @@ const (
)
var (
gitCommit string // set via linker flag
nodeNameVersion string
app = utils.NewApp(Version, "the ether browser")
assetPathFlag = cli.StringFlag{
Name: "asset_path",
@ -55,6 +58,11 @@ func init() {
if len(rpcCorsFlag.Value) == 0 {
rpcCorsFlag.Value = "http://localhost"
}
if gitCommit == "" {
nodeNameVersion = Version
} else {
nodeNameVersion = Version + "-" + gitCommit[:8]
}
app.Action = run
app.Flags = []cli.Flag{
@ -107,7 +115,7 @@ func run(ctx *cli.Context) {
tstart := time.Now()
// TODO: show qml popup instead of exiting if initialization fails.
cfg := utils.MakeEthConfig(ClientIdentifier, Version, ctx)
cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx)
ethereum, err := eth.New(cfg)
if err != nil {
utils.Fatalf("%v", err)