From d6e549a7c4211cfba21179c5f403bc7e3d35b6aa Mon Sep 17 00:00:00 2001 From: DokurOmkar Date: Tue, 23 Jul 2024 14:11:12 -0700 Subject: [PATCH] VH 1319 - Updated the script to support versions that have multi architecture images --- configuration/initialization.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configuration/initialization.sh b/configuration/initialization.sh index ba43e353a..7fa118d61 100755 --- a/configuration/initialization.sh +++ b/configuration/initialization.sh @@ -23,15 +23,16 @@ latest_version=$(echo "$release_info" | grep -o '"tag_name": *"[^"]*"' | cut -d # Fetching all tags from Git repository tags=$(git ls-remote --tags https://github.com/usdot-fhwa-OPS/V2X-Hub.git | awk -F/ '{print $3}' | sort -V) -# Remove curly braces, Properties found, and duplicate entries -updated_tags=$(echo "$tags" | sed 's/\^{}//' | grep -v '^Properties_Found$' | awk '!seen[$0]++') +# Remove curly braces, Properties found, duplicate entries, and show only versions above 7.0 +updated_tags=$(echo "$tags" | sed 's/\^{}//;s/^v//' | grep -v '^Properties_Found$' | awk '!seen[$0]++ && $1 >= "7.0"') # Displaying all available versions +echo "Note: V2X-Hub multi architecture deployments only work for the versions 7.0 and above." echo "Available versions:" echo "$updated_tags" # select a version or accept the latest version as default -read -r -p "Enter V2X-Hub Version (choose from the above, or press Enter to use latest version $latest_version): " chosen_version +read -r -p "Enter V2X-Hub Version (choose from the above, or press Enter to use the latest version $latest_version): " chosen_version V2XHUB_VERSION=${chosen_version:-$latest_version} # Enable Port Drayage functionality