Skip to content

Commit 65ffb7d

Browse files
author
Srinivasan Muralidharan
committed
[FAB-5114] Makefile fix for right version computation
peer exe follows a different metadata pattern than other exes such as configtxgen, cryptogen etc. The fix sets GO_LDFLAGS for each binary production so peer's GO_LDFLAGS can be different from other binaries. . made one scoped change for peer production per Gari's comment Change-Id: I899580796aa20ff299f1a69bf1762dae3a196e84 Signed-off-by: Srinivasan Muralidharan <[email protected]>
1 parent b93fb81 commit 65ffb7d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ release/%/bin/orderer: $(PROJECT_FILES)
350350
mkdir -p $(@D)
351351
$(CGO_FLAGS) GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(abspath $@) -tags "$(GO_TAGS)" -ldflags "$(GO_LDFLAGS)" $(pkgmap.$(@F))
352352

353+
release/%/bin/peer: GO_LDFLAGS = $(patsubst %,-X $(PKGNAME)/common/metadata.%,$(METADATA_VAR))
354+
353355
release/%/bin/peer: $(PROJECT_FILES)
354356
@echo "Building $@ for $(GOOS)-$(GOARCH)"
355357
mkdir -p $(@D)

0 commit comments

Comments
 (0)