From c803dd495029bb602153dce302b4888a5f7f003f Mon Sep 17 00:00:00 2001 From: Dvir Naim Date: Tue, 21 Nov 2023 15:42:09 +0200 Subject: [PATCH] add docker version option --- Solutions/SAP/sapcon-instance-update.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Solutions/SAP/sapcon-instance-update.sh b/Solutions/SAP/sapcon-instance-update.sh index 41d2e8c14a9..09a4456586a 100755 --- a/Solutions/SAP/sapcon-instance-update.sh +++ b/Solutions/SAP/sapcon-instance-update.sh @@ -55,6 +55,11 @@ while [[ $# -gt 0 ]]; do DEVMODE=1 shift 1 ;; + --tag-version) + TAG_VERSION="$2" + FORCE=1 + shift 2 + ;; --dev-acr) DEVURL="$2" shift 2 @@ -161,6 +166,14 @@ while IFS= read -r contname; do else tagver=$tag fi + # in case the TAG_VERSION is defined we are updating the tag specific version + if [ $TAG_VERSION ]; then + if [ $PREVIEW ]; then + tagver=${tagver/latest/$TAG_VERSION} + else + tagver=${tagver/latest/$TAG_VERSION-latest} + fi + fi fi sysfileloc=$(docker inspect "$contname" --format '{{ .Mounts }}'| awk 'NR==1 {print $2}')