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

#42 add version subcommand #114

Merged
merged 3 commits into from
Jan 6, 2023
Merged

#42 add version subcommand #114

merged 3 commits into from
Jan 6, 2023

Conversation

tobert
Copy link
Collaborator

@tobert tobert commented Jan 6, 2023

Adds --version support via ldflags as suggested in #42.

tobert added 3 commits January 6, 2023 12:13
While testing the new version functionality (not committed yet), my
tests failed on these. They seem to have been broken a while so I also
need to look into why previous test runs haven't failed me.

Switched to cmp.Diff because it shows exactly what happened with little
code where t.Fail() is a decision past-me made that I'm annoyed by now.
Adds a function to format version from ldflags. I originally open coded
this in main() and as the feature came together it made more sense in
the otelcli package so I moved it & tests here.
Adds vars in main that can be set by ldflags, and wires them up into the
Cobra startup code in otelcli/root.go. At this point it should "just
work" with goreleaser.
@tobert tobert merged commit efb5608 into equinix-labs:main Jan 6, 2023
@tobert tobert deleted the add-version-subcommand branch January 6, 2023 18:27
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.

2 participants