From d5ffdcf3b8227d3c5f719da494688a3796e85def Mon Sep 17 00:00:00 2001 From: dotcmsbuild Date: Wed, 10 Feb 2021 16:30:40 -0600 Subject: [PATCH] Force picking altest tomcat version --- images/dotcms/build-src/build_dotcms.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/dotcms/build-src/build_dotcms.sh b/images/dotcms/build-src/build_dotcms.sh index fa1b11f..3034fb1 100644 --- a/images/dotcms/build-src/build_dotcms.sh +++ b/images/dotcms/build-src/build_dotcms.sh @@ -37,7 +37,7 @@ build_by_commit() { } set_tomcat_dir() { - tomcat_versions=$(find /srv/dotserver/ -type d -name tomcat-* | grep -oP "(?<=tomcat-)[0-9]{1}\.[0-9]{1}\.[0-9]+$") + tomcat_versions=$(find /srv/dotserver/ -type d -name tomcat-* | grep -oP "(?<=tomcat-)[0-9]{1}\.[0-9]{1}\.[0-9]+$ | sort -k1.2n") echo "Found tomcat installations: ${tomcat_versions}" @@ -50,7 +50,7 @@ set_tomcat_dir() { exit 1 fi else - tomcat_version=$(find /srv/dotserver/ -type d -name tomcat-* | grep -oP "(?<=tomcat-)[0-9]{1}\.[0-9]{1}\.[0-9]+$" | tail -n 1) + tomcat_version=$(find /srv/dotserver/ -type d -name tomcat-* | grep -oP "(?<=tomcat-)[0-9]{1}\.[0-9]{1}\.[0-9]+$" | sort -k1.2n | tail -n 1) [[ -z "${tomcat_version}" ]] && echo "ERROR: Unable to determine Tomcat version" && exit 1 fi