From 65ffb7de23ebb13de9b59f6f77d03ded7ff7b095 Mon Sep 17 00:00:00 2001 From: Srinivasan Muralidharan Date: Thu, 29 Jun 2017 19:22:57 -0400 Subject: [PATCH] [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 --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index ef9910f956a..cff7c483285 100755 --- a/Makefile +++ b/Makefile @@ -350,6 +350,8 @@ release/%/bin/orderer: $(PROJECT_FILES) mkdir -p $(@D) $(CGO_FLAGS) GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(abspath $@) -tags "$(GO_TAGS)" -ldflags "$(GO_LDFLAGS)" $(pkgmap.$(@F)) +release/%/bin/peer: GO_LDFLAGS = $(patsubst %,-X $(PKGNAME)/common/metadata.%,$(METADATA_VAR)) + release/%/bin/peer: $(PROJECT_FILES) @echo "Building $@ for $(GOOS)-$(GOARCH)" mkdir -p $(@D)