-
Notifications
You must be signed in to change notification settings - Fork 102
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
build: get binary build info from debug/buildinfo
#170
Conversation
|
||
install: | ||
@$(call print, "Installing tarod and tarocli.") | ||
$(GOINSTALL) -tags="${tags}" $(LDFLAGS) $(PKG)/cmd/tarod | ||
$(GOINSTALL) -tags="${tags}" $(LDFLAGS) $(PKG)/cmd/tarocli | ||
$(GOINSTALL) -tags="${tags}" $(RELEASE_LDFLAGS) $(PKG)/cmd/tarod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things, when I run make install
I get:
$ make install
fatal: No names found, cannot describe anything.
Installing tarod and tarocli.
GO111MODULE=on go install -v -tags="" -s -w -buildid= -X github.com/lightninglabs/taro/build.Commit= github.com/lightninglabs/taro/cmd/tarod
flag provided but not defined: -s
usage: go install [build flags] [packages]
Run 'go help install' for details.
make: *** [Makefile:95: install] Error 2
And also when I just make
the ./tarod-debug --version
command doesn't anymore have the commit set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump lnd to `609cc8b883c7e6186e447e8d7e6349688d78d4fd` in master, which already includes the change for including the build tags info without using `-ldflags`. This is needed for running the itests, which build lnd and won't have the build tags replicated a `-ldflags`.
By using the `debug/buildinfo` package we do not have to relay on setting custom ldflags. Unfortunately, there is no `vcs.tags` settings so we need to still pass the output of `git describe --tags --dirty` as an ldflag.
I updated lnd to ensure that it had the latest changes in master. However, I am not sure if there is anything that is incompatible with the project yet 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK! 🎉
By using the
debug/buildinfo
package we do not have to rely on setting custom ldflags.Unfortunately, there is no
vcs.tags
settings so we need to still pass the output ofgit describe --tags --dirty
as an ldflag.Note: this change was already merged in LND and the lnd package need to be updated in
go.mod
for this to work.