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 version support #210
Add version support #210
Conversation
Signed-off-by: Evan Gibler <keybase@egibs.xyz>
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.
I like this feature, but would prefer if it could be done in such a way that it still works if you run:
go install . && cd /tmp && bincapz --version
What do you think about moving the version string out of the VERSION
file and into a const - for instance version.ID
?
Signed-off-by: Evan Gibler <keybase@egibs.xyz>
VERSION
Outdated
@@ -0,0 +1 @@ | |||
0.11.0 |
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.
I think we can get rid of this now.
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.
Removed in 5be38e1
(#210).
bincapz.go
Outdated
@@ -50,6 +51,8 @@ func main() { | |||
statsFlag := flag.Bool("stats", false, "Show statistics about the scan") | |||
thirdPartyFlag := flag.Bool("third-party", true, "Include third-party rules, which may have licensing restrictions") | |||
verboseFlag := flag.Bool("verbose", false, "Emit verbose logging messages to stderr") | |||
versionFlag := flag.Bool("version", false, "show version information") |
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.
Capitalize "Show" for consistency with your more recent flag changes.
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.
Fixed in 9b582f9
(#210).
Closes: #209
This PR adds support for a
--version
flag that will either use the newly-addedVERSION
file or check for themain.version
build key.Testing:
We aren't publishing binaries yet but this should work the same if we use the
VERSION
file as the source of truth; however, this file will need to be updated prior to any new releases being cut.If there's a better way to handle this I'm all ears!