-
Notifications
You must be signed in to change notification settings - Fork 110
Conversation
I am not sure this will work, we set |
swarm/version/version.go
Outdated
@@ -41,6 +41,10 @@ var VersionWithMeta = func() string { | |||
return v | |||
}() | |||
|
|||
// 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment is wrong, should say
version.GitCommit
instead of
main.gitCommit
swarm/version/version.go
Outdated
@@ -51,6 +55,7 @@ func ArchiveVersion(gitCommit string) string { | |||
} | |||
if len(gitCommit) >= 8 { | |||
vsn += "-" + gitCommit[:8] | |||
GitCommit = gitCommit[:8] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant. We can just use this function, it also gives the current version, next to the commit, which is not bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not only this is redundant, but actually wrong - GitCommit
is set during build time, we should not be modifying it.
swarm/version/version.go
Outdated
@@ -59,6 +64,7 @@ func VersionWithCommit(gitCommit string) string { | |||
vsn := Version | |||
if len(gitCommit) >= 8 { | |||
vsn += "-" + gitCommit[:8] | |||
GitCommit = gitCommit[:8] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant. We can just use this function, it also gives the current version, next to the commit, which is not bad.
@gluk256 I see that you are adding In this case, please remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - you can open on ethereum:master and will merge.
fixes #1133