Skip to content

Commit 7283675

Browse files
author
Nao Nishijima
committed
[FAB-9495] Fix to be able to get a specific images
- Add grep option -P which is Perl regular expression. Since grep's default mode is POSIX, grep can't realize '\d'. As a result, user can't get a specific version of fabric's docker images - Move the definition of CA/FABRIC/THIRDPARTY_TAG to after the line checking an argument. In the current script, VERSION doesn't reflect *_TAG. Change-Id: Ib44f659d3746d0ab976475df385b028fb34b9f41 Signed-off-by: Nao Nishijima <nao.nishijima@hal.hitachi.com>
1 parent f3d14f8 commit 7283675

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/bootstrap.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ dockerCaPull() {
5454
docker tag hyperledger/fabric-ca:$CA_TAG hyperledger/fabric-ca
5555
}
5656

57-
: ${CA_TAG:="$MARCH-$CA_VERSION"}
58-
: ${FABRIC_TAG:="$MARCH-$VERSION"}
59-
: ${THIRDPARTY_TAG:="$MARCH-$THIRDPARTY_IMAGE_VERSION"}
60-
6157
samplesInstall() {
6258
# clone (if needed) hyperledger/fabric-samples and checkout corresponding
6359
# version to the binaries and docker images to be downloaded
@@ -115,13 +111,17 @@ BINARIES=true
115111

116112
# Parse commandline args pull out
117113
# version and/or ca-version strings first
118-
if echo $1 | grep -q '\d'; then
114+
if echo $1 | grep -P -q '\d'; then
119115
VERSION=$1;shift
120-
if echo $1 | grep -q '\d'; then
116+
if echo $1 | grep -P -q '\d'; then
121117
CA_VERSION=$1;shift
122118
fi
123119
fi
124120

121+
: ${CA_TAG:="$MARCH-$CA_VERSION"}
122+
: ${FABRIC_TAG:="$MARCH-$VERSION"}
123+
: ${THIRDPARTY_TAG:="$MARCH-$THIRDPARTY_IMAGE_VERSION"}
124+
125125
# then parse opts
126126
while getopts "h?dsb" opt; do
127127
case "$opt" in

0 commit comments

Comments
 (0)