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

refactor(builder): change output of version subcommand. #8994

Merged
merged 5 commits into from
Dec 9, 2023

Conversation

devoc09
Copy link
Contributor

@devoc09 devoc09 commented Nov 27, 2023

With this change, running builder version on binaries installed with go install will output the version specified at the suffix.

If it's under development, the following output will be obtained.

$ GO111MODULE=on CGO_ENABLED=0 go run . version
ocb version (devel)

Link to tracking Issue: #8770

@devoc09 devoc09 requested review from a team and Aneurysm9 November 27, 2023 17:28
Copy link

linux-foundation-easycla bot commented Nov 27, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

cmd/builder/internal/version.go Outdated Show resolved Hide resolved
cmd/builder/internal/version.go Outdated Show resolved Hide resolved
If version information has not been inserted by `ldflags`,
the build information embedded in the binary being executed is output.

Return an error when failing to retrieve the version, and to use cobra's `RunE`.
@devoc09 devoc09 force-pushed the output_version_of_binary branch from 30d0ed0 to d0953f9 Compare November 28, 2023 15:52
@devoc09
Copy link
Contributor Author

devoc09 commented Nov 28, 2023

I have combined the commits into one and pushed it, so please check again.

@devoc09 devoc09 requested a review from bogdandrutu November 30, 2023 01:43
@bogdandrutu
Copy link
Member

Please add a changelog entry.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (7c58e71) 91.56% compared to head (8b7b2d5) 91.49%.

Files Patch % Lines
cmd/builder/internal/version.go 0.00% 14 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8994      +/-   ##
==========================================
- Coverage   91.56%   91.49%   -0.07%     
==========================================
  Files         316      316              
  Lines       17168    17181      +13     
==========================================
  Hits        15720    15720              
- Misses       1152     1165      +13     
  Partials      296      296              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@devoc09 devoc09 force-pushed the output_version_of_binary branch from 083e307 to 1759818 Compare December 7, 2023 05:41
@devoc09
Copy link
Contributor Author

devoc09 commented Dec 7, 2023

Please add a changelog entry.

Added changelog. Please review again 🙏

@bogdandrutu bogdandrutu merged commit b0f618e into open-telemetry:main Dec 9, 2023
30 of 31 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 9, 2023
@devoc09 devoc09 deleted the output_version_of_binary branch December 10, 2023 06:27
bogdandrutu pushed a commit that referenced this pull request Sep 25, 2024
jackgopack4 pushed a commit to jackgopack4/opentelemetry-collector that referenced this pull request Oct 8, 2024
HongChenTW pushed a commit to HongChenTW/opentelemetry-collector that referenced this pull request Dec 19, 2024
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.

3 participants