Skip to content

Commit

Permalink
Update chaintool
Browse files Browse the repository at this point in the history
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 <gregory.haskins@gmail.com>
  • Loading branch information
ghaskins committed Jul 29, 2016
1 parent fb7da0d commit 5ed655c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ PROJECT_NAME=hyperledger/fabric
PKGNAME = github.com/$(PROJECT_NAME)
CGO_FLAGS = CGO_CFLAGS=" " CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy"
UID = $(shell id -u)
CHAINTOOL_RELEASE=v0.8.1

EXECUTABLES = go docker git
EXECUTABLES = go docker git curl
K := $(foreach exec,$(EXECUTABLES),\
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH: Check dependencies")))

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

%/bin/chaintool:
build/bin/chaintool: Makefile
@echo "Installing chaintool"
@cp devenv/tools/chaintool $@
@mkdir -p $(@D)
curl -L https://github.com/hyperledger/fabric-chaintool/releases/download/$(CHAINTOOL_RELEASE)/chaintool > $@
chmod +x $@

%/bin/chaintool: build/bin/chaintool
@mkdir -p $(@D)
@cp $^ $@

# We (re)build a package within a docker context but persist the $GOPATH/pkg
# directory so that subsequent builds are faster
Expand Down
Binary file removed devenv/tools/chaintool
Binary file not shown.

0 comments on commit 5ed655c

Please sign in to comment.