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

add more information to the version command #415

Merged
merged 5 commits into from
Dec 7, 2021
Merged

Conversation

cpanato
Copy link
Contributor

@cpanato cpanato commented Nov 26, 2021

Summary

  • add more information to the version command

with git tree dirty

$ ./mmctl version
mmctl:
Version:       6.2.0
GitCommit:     39ba825fe3cc6c6dc9a6923558ceae3a19f40972
GitTreeState:  "dirty"
BuildDate:     2021-11-24T15:32:38Z
GoVersion:     go1.17.2
Compiler:      gc
Platform:      darwin/amd64

clean

$ ./mmctl version
mmctl:
Version:       6.2.0
GitCommit:     9bf25229ba32ed393a1497783cb0bf96b799ea52
GitTreeState:  "clean"
BuildDate:     2021-11-26T14:38:18Z
GoVersion:     go1.17.2
Compiler:      gc
Platform:      darwin/amd64

if need to consume as machine readable

$ ./mmctl version --json
{
  "Version": "6.2.0",
  "GitCommit": "9bf25229ba32ed393a1497783cb0bf96b799ea52",
  "GitTreeState": "\"clean\"",
  "BuildDate": "2021-11-26T14:38:18Z",
  "GoVersion": "go1.17.2",
  "Compiler": "gc",
  "Platform": "darwin/amd64"
}

Ticket Link

@codecov-commenter
Copy link

codecov-commenter commented Nov 26, 2021

Codecov Report

Merging #415 (030ebcf) into master (39ba825) will decrease coverage by 0.18%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #415      +/-   ##
==========================================
- Coverage   67.17%   66.99%   -0.19%     
==========================================
  Files          45       45              
  Lines        4619     4632      +13     
==========================================
  Hits         3103     3103              
- Misses       1315     1328      +13     
  Partials      201      201              
Impacted Files Coverage Δ
commands/version.go 11.76% <0.00%> (-38.24%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 39ba825...030ebcf. Read the comment docs.

Copy link
Member

@isacikgoz isacikgoz left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for adding this! Have some code change suggestions. (Sorry to being them sooo long, but I thought that it would be easier to suggest the code in my mind)

commands/version.go Outdated Show resolved Hide resolved
commands/version.go Outdated Show resolved Hide resolved
commands/version.go Outdated Show resolved Hide resolved
commands/version.go Outdated Show resolved Hide resolved
Carlos Tadeu Panato Junior and others added 2 commits December 7, 2021 14:11
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Copy link
Member

@isacikgoz isacikgoz left a comment

Choose a reason for hiding this comment

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

Thank you @cpanato, Looks good 👍

@cpanato cpanato merged commit 3661107 into master Dec 7, 2021
@cpanato cpanato deleted the extendedversion branch December 7, 2021 13:46
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.

None yet

3 participants