good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit eca39e12 authored by Igor Mandrigin's avatar Igor Mandrigin Committed by GitHub
Browse files

Fix reproducible builds (#1099)

parent 5339ca09
Branches
Tags
No related merge requests found
...@@ -21,12 +21,12 @@ docker-compose: ...@@ -21,12 +21,12 @@ docker-compose:
docker-compose up docker-compose up
geth: geth:
$(GOBUILD) -o $(GOBIN)/tg -ldflags "-X main.GitCommit=${GIT_COMMIT} -X main.GitDate=$(shell date +%Y.%m.%d.%H%M%S)" ./cmd/tg $(GOBUILD) -o $(GOBIN)/tg -ldflags "-X main.gitCommit=${GIT_COMMIT}" ./cmd/tg
@echo "Done building." @echo "Done building."
@echo "Run \"$(GOBIN)/tg\" to launch turbo-geth." @echo "Run \"$(GOBIN)/tg\" to launch turbo-geth."
tg: tg:
$(GOBUILD) -o $(GOBIN)/tg -ldflags "-X main.GitCommit=${GIT_COMMIT} -X main.GitDate=$(shell date +%Y.%m.%d.%H%M%S)" ./cmd/tg $(GOBUILD) -o $(GOBIN)/tg -ldflags "-X main.gitCommit=${GIT_COMMIT}" ./cmd/tg
@echo "Done building." @echo "Done building."
@echo "Run \"$(GOBIN)/tg\" to launch turbo-geth." @echo "Run \"$(GOBIN)/tg\" to launch turbo-geth."
......
...@@ -14,8 +14,7 @@ import ( ...@@ -14,8 +14,7 @@ import (
) )
var ( var (
GitCommit string gitCommit string
GitDate string
) )
func main() { func main() {
...@@ -31,7 +30,7 @@ func runTurboGeth(ctx *cli.Context) { ...@@ -31,7 +30,7 @@ func runTurboGeth(ctx *cli.Context) {
stagedsync.DefaultUnwindOrder(), stagedsync.DefaultUnwindOrder(),
) )
tg := node.New(ctx, sync, node.Params{GitCommit: GitCommit, GitDate: GitDate}) tg := node.New(ctx, sync, node.Params{GitCommit: gitCommit})
err := tg.Serve() err := tg.Serve()
if err != nil { if err != nil {
......
...@@ -43,7 +43,6 @@ func (tg *TurboGethNode) run() { ...@@ -43,7 +43,6 @@ func (tg *TurboGethNode) run() {
} }
type Params struct { type Params struct {
GitDate string
GitCommit string GitCommit string
CustomBuckets dbutils.BucketsCfg CustomBuckets dbutils.BucketsCfg
} }
...@@ -75,8 +74,8 @@ func makeEthConfig(ctx *cli.Context, node *node.Node) *eth.Config { ...@@ -75,8 +74,8 @@ func makeEthConfig(ctx *cli.Context, node *node.Node) *eth.Config {
func makeNodeConfig(ctx *cli.Context, p Params) *node.Config { func makeNodeConfig(ctx *cli.Context, p Params) *node.Config {
nodeConfig := node.DefaultConfig nodeConfig := node.DefaultConfig
// see simiar changes in `cmd/geth/config.go#defaultNodeConfig` // see simiar changes in `cmd/geth/config.go#defaultNodeConfig`
if commit, date := p.GitCommit, p.GitDate; commit != "" && date != "" { if commit := p.GitCommit; commit != "" {
nodeConfig.Version = params.VersionWithCommit(commit, date) nodeConfig.Version = params.VersionWithCommit(commit, "")
} else { } else {
nodeConfig.Version = params.Version nodeConfig.Version = params.Version
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment