Skip to content

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