Skip to content

Commit f16db5d

Browse files
authored
Merge pull request edgexfoundry#897 from cherrycl/update-version
fix(napa): Set version to variable in get-compose-file
2 parents 894b30f + a27abfd commit f16db5d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

TAF/utils/scripts/docker/get-compose-file.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ for compose in ${COMPOSE_FILE}; do
120120

121121
# Multiple Instance of device-modbus
122122
sed -n "/^\ \ device-modbus:/,/^ [a-z].*:$/p" ${compose}.yml | sed '$d' > tmp/device-modbus_1.yml
123+
VERSION_NUM=$(grep image tmp/device-modbus_1.yml|cut -d ':' -f3)
123124
sed -i 's/device-modbus/device-modbus_1/g' tmp/device-modbus_1.yml
124-
sed -i "s/device-modbus_1${USE_ARM64}:3.1.0/device-modbus${USE_ARM64}:3.1.0/g" tmp/device-modbus_1.yml
125+
sed -i "s/device-modbus_1${USE_ARM64}:${VERSION_NUM}/device-modbus${USE_ARM64}:${VERSION_NUM}/g" tmp/device-modbus_1.yml
125126
if [ "${USE_SECURITY}" = '-security-' ]; then
126127
sed -i 's/- \/device-modbus_1/- \/device-modbus/g' tmp/device-modbus_1.yml
127128
fi

0 commit comments

Comments
 (0)