-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add semantic version from git tag #164
Add semantic version from git tag #164
Conversation
@@ -214,6 +214,8 @@ func buildCredentials(skipVerify bool, caCerts, clientCert, clientKey, serverNam | |||
return credentials.NewTLS(&cfg), nil | |||
} | |||
|
|||
var versionTag = "" // set from git tag via ldflags during build |
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.
We can also default to eg. "development"
:
var versionTag = "" // set from git tag via ldflags during build | |
var versionTag = "development" // set from git tag via ldflags during build |
and remove the condition lower to keep code simpler and provide consistent output structure.
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.
Yeah sounds good. I initially deemed tag is not so useful and anyone who needs can derive it from commit ID.
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.
"Sounds good" as in omiting the tag if not set via ldflags
(as currently implemented) or showing the "development" in such cases (as suggested as an option in this comment thread)?
6dc82a8
to
d356a18
Compare
Binaries of the recent v0.4.22 release show the version from tag as:
|
Awesome, thanks. |
Improves upon #146 to include the semantic version number from git tag.