Skip to content

Commit 5ed655c

Browse files
committed
Update chaintool
We remove the locally cached ./devenv/tools/chaintool binary and instead download the package from the latest github release. Change-Id: I36a0e8a9db40c89f0641cda2905e617c0ea41720 Signed-off-by: Gregory Haskins <[email protected]>
1 parent fb7da0d commit 5ed655c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Makefile

+10-3
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ PROJECT_NAME=hyperledger/fabric
4040
PKGNAME = github.com/$(PROJECT_NAME)
4141
CGO_FLAGS = CGO_CFLAGS=" " CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy"
4242
UID = $(shell id -u)
43+
CHAINTOOL_RELEASE=v0.8.1
4344

44-
EXECUTABLES = go docker git
45+
EXECUTABLES = go docker git curl
4546
K := $(foreach exec,$(EXECUTABLES),\
4647
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH: Check dependencies")))
4748

@@ -109,9 +110,15 @@ linter: gotools
109110
-v $(abspath $(@D)):/opt/gopath/bin \
110111
hyperledger/fabric-baseimage go install github.com/golang/protobuf/protoc-gen-go
111112

112-
%/bin/chaintool:
113+
build/bin/chaintool: Makefile
113114
@echo "Installing chaintool"
114-
@cp devenv/tools/chaintool $@
115+
@mkdir -p $(@D)
116+
curl -L https://github.com/hyperledger/fabric-chaintool/releases/download/$(CHAINTOOL_RELEASE)/chaintool > $@
117+
chmod +x $@
118+
119+
%/bin/chaintool: build/bin/chaintool
120+
@mkdir -p $(@D)
121+
@cp $^ $@
115122

116123
# We (re)build a package within a docker context but persist the $GOPATH/pkg
117124
# directory so that subsequent builds are faster

devenv/tools/chaintool

-11.1 MB
Binary file not shown.

0 commit comments

Comments
 (0)