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

[cmd/builder] Use runtime.DebugInfo to show version #8770

Closed
mx-psi opened this issue Oct 30, 2023 · 3 comments
Closed

[cmd/builder] Use runtime.DebugInfo to show version #8770

mx-psi opened this issue Oct 30, 2023 · 3 comments
Assignees
Labels
area:builder enhancement New feature or request

Comments

@mx-psi
Copy link
Member

mx-psi commented Oct 30, 2023

As suggested in gordonklaus/ineffassign#53 (comment) we can use runtime.DebugInfo to get the version when installing via go install. This avoids the confusion of #8691. We should check our official builds to avoid breaking the version on non-go install binaries (in the worst case, we can check which of the two we are in)

@mx-psi mx-psi added enhancement New feature or request area:builder labels Oct 30, 2023
@devoc09
Copy link
Contributor

devoc09 commented Nov 26, 2023

@mx-psi Hi! Is it okay if I take on this issue?

@mx-psi
Copy link
Member Author

mx-psi commented Nov 27, 2023

@devoc09 assigned to you :)

bogdandrutu added a commit that referenced this issue Dec 9, 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

---------

Co-authored-by: Bogdan Drutu <[email protected]>
@atoulme
Copy link
Contributor

atoulme commented Dec 14, 2023

Closing as completed, thanks!

@atoulme atoulme closed this as completed Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:builder enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants