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