aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2019-05-08 22:11:33 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-05-08 22:11:33 +0800
commit9454508b2327e40e9ce5359864131e57139b18a7 (patch)
treee8e5a7cc35f97198e30f11363875710643176d05 /cmd
parentbe4d74f8d22e573d37a4bf4514aa4320cb62a75d (diff)
downloadgo-tangerine-9454508b2327e40e9ce5359864131e57139b18a7.tar
go-tangerine-9454508b2327e40e9ce5359864131e57139b18a7.tar.gz
go-tangerine-9454508b2327e40e9ce5359864131e57139b18a7.tar.bz2
go-tangerine-9454508b2327e40e9ce5359864131e57139b18a7.tar.lz
go-tangerine-9454508b2327e40e9ce5359864131e57139b18a7.tar.xz
go-tangerine-9454508b2327e40e9ce5359864131e57139b18a7.tar.zst
go-tangerine-9454508b2327e40e9ce5359864131e57139b18a7.zip
cmd/faucet: embed git commit hash and date into the version
Diffstat (limited to 'cmd')
-rw-r--r--cmd/faucet/faucet.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go
index 78b4a6563..92d0db990 100644
--- a/cmd/faucet/faucet.go
+++ b/cmd/faucet/faucet.go
@@ -88,6 +88,11 @@ var (
ether = new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)
)
+var (
+ gitCommit = "" // Git SHA1 commit hash of the release (set via linker flags)
+ gitDate = "" // Git commit date YYYYMMDD of the release (set via linker flags)
+)
+
func main() {
// Parse the flags and set up the logger to print everything requested
flag.Parse()
@@ -216,7 +221,7 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network u
// Assemble the raw devp2p protocol stack
stack, err := node.New(&node.Config{
Name: "geth",
- Version: params.VersionWithMeta,
+ Version: params.VersionWithCommit(gitCommit, gitDate),
DataDir: filepath.Join(os.Getenv("HOME"), ".faucet"),
P2P: p2p.Config{
NAT: nat.Any(),