Skip to content
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

feat: add version command #50

Merged
merged 2 commits into from
Dec 15, 2022
Merged

feat: add version command #50

merged 2 commits into from
Dec 15, 2022

Conversation

jwillker
Copy link
Contributor

The version command was missing, as mentioned in this issue.

The goreleaser already setting build information here:

ldflags:
# prettier-ignore
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}}'
, to take advantage of this I implemented this feature based on this information.

The "urfave/cli" already has a clean way to implement this feature, as mentioned here: https://cli.urfave.org/v2/examples/version-flag/

@wolf99
Copy link
Contributor

wolf99 commented Dec 14, 2022

Relates to #18

@oliverchang
Copy link
Collaborator

Thank you so much for contributing this!

@another-rex
Copy link
Collaborator

/gcbrun

Copy link
Collaborator

@another-rex another-rex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!, Just two minor comments.

cmd/osv-scanner/main.go Outdated Show resolved Hide resolved
cmd/osv-scanner/main.go Outdated Show resolved Hide resolved
@another-rex
Copy link
Collaborator

/gcbrun

@another-rex another-rex merged commit 23ec6e1 into google:main Dec 15, 2022
julieqiu pushed a commit to julieqiu/osv-scanner that referenced this pull request May 2, 2023
julieqiu pushed a commit to julieqiu/osv-scanner that referenced this pull request May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants