Added -trimpath option to go build#2064
Conversation
Makefile
Outdated
| esc -pkg frontend -o examples/hotrod/services/frontend/gen_assets.go -prefix examples/hotrod/services/frontend/web_assets examples/hotrod/services/frontend/web_assets | ||
| ifeq ($(GOARCH), s390x) | ||
| CGO_ENABLED=0 installsuffix=cgo go build -o ./examples/hotrod/hotrod-$(GOOS)-$(GOARCH) ./examples/hotrod/main.go | ||
| CGO_ENABLED=0 installsuffix=cgo go build -trimpath -o ./examples/hotrod/hotrod-$(GOOS)-$(GOARCH) ./examples/hotrod/main.go |
There was a problem hiding this comment.
it would be better if we define GOBUILD=CGO_ENABLED=0 installsuffix=cgo go build -trimpath in L30 and use $(GOBUILD), to DRY this up.
There was a problem hiding this comment.
Makes total sense. I've updated the code.
Codecov Report
@@ Coverage Diff @@
## master #2064 +/- ##
=======================================
Coverage 97.42% 97.42%
=======================================
Files 209 209
Lines 10340 10340
=======================================
Hits 10074 10074
Misses 223 223
Partials 43 43Continue to review full report at Codecov.
|
|
is |
Fixes jaegertracing#2063 Signed-off-by: Pablo Caderno <kaderno@gmail.com> Signed-off-by: kaderno <kaderno@gmail.com>
Defined variable per suggestion of @yurishkuro Signed-off-by: kaderno <kaderno@gmail.com>
Signed-off-by: Pablo Caderno <kaderno@gmail.com> Signed-off-by: kaderno <kaderno@gmail.com>
Signed-off-by: kaderno <kaderno@gmail.com>
6cd0453 to
2117ca2
Compare
|
@pavolloffay it only trims directory path, not the package name. Vendored packages do not have github.com/jaegertracing/... prefix. |
|
Thanks @kadern0 |
Fixes #2063
Signed-off-by: Pablo Caderno kaderno@gmail.com
Which problem is this PR solving?
go build -trimpath#2063Short description of the changes