diff options
author | gluk256 <gluk256@users.noreply.github.com> | 2019-01-24 19:35:10 +0800 |
---|---|---|
committer | Rafael Matias <rafael@skyle.net> | 2019-02-19 19:56:31 +0800 |
commit | e247dcc141a5d1c9129b987a5f164e9df29be951 (patch) | |
tree | 04d2f9a4afe367a3a2c1a6bf5644a102c24230c7 /cmd | |
parent | b774d0a507017b2ba7a0d02f6aa23a0a83d1a768 (diff) | |
download | go-tangerine-e247dcc141a5d1c9129b987a5f164e9df29be951.tar go-tangerine-e247dcc141a5d1c9129b987a5f164e9df29be951.tar.gz go-tangerine-e247dcc141a5d1c9129b987a5f164e9df29be951.tar.bz2 go-tangerine-e247dcc141a5d1c9129b987a5f164e9df29be951.tar.lz go-tangerine-e247dcc141a5d1c9129b987a5f164e9df29be951.tar.xz go-tangerine-e247dcc141a5d1c9129b987a5f164e9df29be951.tar.zst go-tangerine-e247dcc141a5d1c9129b987a5f164e9df29be951.zip |
swarm/version: commit version added (#18510)
(cherry picked from commit ad13d2d407d2f614c39af92430fda0a926da2a8a)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/swarm/main.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go index 722dc4ff5..53888b615 100644 --- a/cmd/swarm/main.go +++ b/cmd/swarm/main.go @@ -66,9 +66,10 @@ OPTIONS: {{end}}{{end}} ` -var ( - gitCommit string // Git SHA1 commit hash of the release (set via linker flags) -) +// Git SHA1 commit hash of the release (set via linker flags) +// this variable will be assigned if corresponding parameter is passed with install, but not with test +// e.g.: go install -ldflags "-X main.gitCommit=ed1312d01b19e04ef578946226e5d8069d5dfd5a" ./cmd/swarm +var gitCommit string //declare a few constant error messages, useful for later error check comparisons in test var ( @@ -89,6 +90,7 @@ var defaultNodeConfig = node.DefaultConfig // This init function sets defaults so cmd/swarm can run alongside geth. func init() { + sv.GitCommit = gitCommit defaultNodeConfig.Name = clientIdentifier defaultNodeConfig.Version = sv.VersionWithCommit(gitCommit) defaultNodeConfig.P2P.ListenAddr = ":30399" |