From 06db84281c09c138c20f4627f37b35357e7867ce Mon Sep 17 00:00:00 2001
From: Christian Helwig <helwig@vr.rwth-aachen.de>
Date: Thu, 8 Aug 2024 13:26:05 +0200
Subject: [PATCH] Adds a regex check for the EngineAssociation format

---
 shared_scripts.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/shared_scripts.yml b/shared_scripts.yml
index fd97066..dc335c4 100644
--- a/shared_scripts.yml
+++ b/shared_scripts.yml
@@ -128,8 +128,7 @@ variables:
     # Check for matching unreal version
     - ASSOCIATION_LINE=$(grep "EngineAssociation" "${CI_PROJECT_DIR}/${PROJECT_NAME}.uproject")
     - ASSOCIATION=$(echo "$ASSOCIATION_LINE" | cut -d ":" -f 2 | cut -d "\"" -f 2 | cut -d "\"" -f 1)
-    - if [ "$ASSOCIATION" != "$UNREAL_VERSION" ]
-    - then
+    - if [[ $ASSOCIATION = [0-9]*\.[0-9]* && "$ASSOCIATION" != "$UNREAL_VERSION" ]]; then
     - 	echo -e "\e[33mWARNING The Unreal Engine version on the runner does not match your project version.\nProject version:\t${ASSOCIATION}\nRunner version:\t\t${UNREAL_VERSION}\e[m"
     - fi
     - EXIT_CODE=0
-- 
GitLab