1313# checks: runs all check conditions (license, spelling, linting)
1414# clean: stops docker conatainers used for integration testing
1515# mock-gen: generate mocks needed for testing (using mockgen)
16+ # channel-artifacts: generates the channel configuration transactions and blocks used by tests
1617# populate: populates generated files (not included in git) - currently only vendor
1718# populate-vendor: populate the vendor directory based on the lock
18- # populate-clean: cleans up populated files (might become part of clean eventually)
19+ # populate-clean: cleans up populated files (might become part of clean eventually)
1920# thirdparty-pin: pulls (and patches) pinned dependencies into the project under internal
2021#
21- #
22- # Instructions to generate .tx files used for creating channels:
23- # Download the configtxgen binary for your OS from (it is located in the .tar.gz file):
24- # https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric
25- # Sample command: $ path/to/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx testchannel.tx -channelID testchannel
26- # More Docs: http://hyperledger-fabric.readthedocs.io/en/latest/configtxgen.html
27- #
2822
2923
3024export ARCH =$(shell uname -m)
@@ -39,6 +33,10 @@ THIRDPARTY_FABRIC_CA_COMMIT=v1.0.1
3933THIRDPARTY_FABRIC_BRANCH =master
4034THIRDPARTY_FABRIC_COMMIT =a657db28a0ff53ed512bd6f4ac4786a0f4ca709c
4135
36+ # Local variables used by makefile
37+ PACKAGE_NAME =github.com/hyperledger/fabric-sdk-go
38+ FABRIC_TOOLS_RELEASE =1.0.1
39+
4240# Detect CI
4341ifdef JENKINS_URL
4442export FABRIC_SDKGO_DEPEND_INSTALL =true
@@ -97,6 +95,13 @@ mock-gen:
9795 mockgen -build_flags ' $(LDFLAGS)' github.com/hyperledger/fabric-sdk-go/api/apiconfig Config | sed " s/github.com\/hyperledger\/fabric-sdk-go\/vendor\///g" > api/apiconfig/mocks/mockconfig.gen.go
9896 mockgen -build_flags ' $(LDFLAGS)' github.com/hyperledger/fabric-sdk-go/api/apifabca FabricCAClient | sed " s/github.com\/hyperledger\/fabric-sdk-go\/vendor\///g" > api/apifabca/mocks/mockfabriccaclient.gen.go
9997
98+ channel-artifacts :
99+ @echo " Generating test channel configuration transactions and blocks"
100+ @docker run -i \
101+ -v $(abspath .) :/opt/gopath/src/$(PACKAGE_NAME ) \
102+ hyperledger/fabric-tools:$(ARCH ) -$(FABRIC_TOOLS_RELEASE ) \
103+ /bin/bash -c " /opt/gopath/src/${PACKAGE_NAME} /test/scripts/generate_channeltx.sh"
104+
100105thirdparty-pin :
101106 UPSTREAM_COMMIT=$(THIRDPARTY_FABRIC_COMMIT ) UPSTREAM_BRANCH=$(THIRDPARTY_FABRIC_BRANCH ) scripts/third_party_pins/fabric/apply_upstream.sh
102107 UPSTREAM_COMMIT=$(THIRDPARTY_FABRIC_CA_COMMIT ) UPSTREAM_BRANCH=$(THIRDPARTY_FABRIC_CA_BRANCH ) scripts/third_party_pins/fabric-ca/apply_upstream.sh
0 commit comments