Skip to content

Commit

Permalink
[FAB-5114] Makefile fix for right version computation
Browse files Browse the repository at this point in the history
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 <muralisr@us.ibm.com>
  • Loading branch information
Srinivasan Muralidharan committed Jul 1, 2017
1 parent b93fb81 commit 65ffb7d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 65ffb7d

Please sign in to comment.