-
Hi friends :) I'm adding a I then tried following what goreleaser itself does by providing flags to the compiler with: ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X main.builtBy=goreleaser And then accessing them with When running
My code can be found on this branch in my repo dlvhdr/gh-dash@v3.7.0-next Appreciate any help! |
Beta Was this translation helpful? Give feedback.
Answered by
caarlos0
Feb 14, 2023
Replies: 1 comment 2 replies
-
Hey! OK, a couple of things:
hope that clear things up and helps a little bit :) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
dlvhdr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey!
OK, a couple of things:
-X main.version
flags need to point to that cmd pkg, you can try it out locally withgo build
to figure out the right combinationgomod.enabled
, yes, it'll require the tag to be pushed, because it'll use the code from the go mod proxy