mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
move revisions file to ~/.tendermint/
This commit is contained in:
parent
dea5eab643
commit
e4fae760af
12
Makefile
12
Makefile
@ -2,13 +2,15 @@
|
||||
|
||||
all: install
|
||||
|
||||
TMROOT = $${TMROOT:-$$HOME/.tendermint}
|
||||
|
||||
install:
|
||||
go install github.com/tendermint/tendermint/cmd/tendermint
|
||||
go install github.com/tendermint/tendermint/cmd/barak
|
||||
go install github.com/tendermint/tendermint/cmd/debora
|
||||
go install github.com/tendermint/tendermint/cmd/stdinwriter
|
||||
go install github.com/tendermint/tendermint/cmd/logjack
|
||||
echo -n `git rev-parse --verify HEAD` > .revision
|
||||
@echo -n `git rev-parse --verify HEAD` > $(TMROOT)/revisions
|
||||
|
||||
build:
|
||||
go build -o build/tendermint github.com/tendermint/tendermint/cmd/tendermint
|
||||
@ -44,10 +46,4 @@ gen_client:
|
||||
go generate rpc/core_client/*.go
|
||||
|
||||
revision:
|
||||
echo -n `git rev-parse --verify HEAD` > .revision
|
||||
|
||||
tendermint_root/priv_validator.json: tendermint_root/priv_validator.json.orig
|
||||
cp $< $@
|
||||
|
||||
clean:
|
||||
rm -f tendermint tendermint_root/priv_validator.json
|
||||
@echo -n `git rev-parse --verify HEAD` > $(TMROOT)/revisions
|
||||
|
@ -5,14 +5,12 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
GoPath = os.Getenv("GOPATH")
|
||||
TendermintRepo = path.Join(GoPath, "src", "github.com", "tendermint", "tendermint")
|
||||
GoPath = os.Getenv("GOPATH")
|
||||
)
|
||||
|
||||
func TrapSignal(cb func()) {
|
||||
|
@ -70,6 +70,7 @@ func GetConfig(rootDir string) cfg.Config {
|
||||
mapConfig.SetDefault("db_dir", rootDir+"/data")
|
||||
mapConfig.SetDefault("log_level", "info")
|
||||
mapConfig.SetDefault("rpc_laddr", "0.0.0.0:46657")
|
||||
mapConfig.SetDefault("revisions_file", rootDir+"/revisions")
|
||||
return mapConfig
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@ import (
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@ -247,7 +246,7 @@ func makeNodeInfo(sw *p2p.Switch) *types.NodeInfo {
|
||||
}
|
||||
|
||||
// include git hash in the nodeInfo if available
|
||||
if rev, err := ReadFile(path.Join(TendermintRepo, ".revision")); err == nil {
|
||||
if rev, err := ReadFile(config.GetString("revisions_file")); err == nil {
|
||||
nodeInfo.Revision = string(rev)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user