From 526c1b31b6c8ec034acf11f2ded8ac023ce42461 Mon Sep 17 00:00:00 2001 From: DokurOmkar Date: Thu, 11 Jul 2024 08:47:59 -0700 Subject: [PATCH] VH 1324 - Updated the initialization script to filter the versions returned --- configuration/docker-compose.yml | 2 +- configuration/initialization.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configuration/docker-compose.yml b/configuration/docker-compose.yml index 3938dc5cc..61f61926d 100755 --- a/configuration/docker-compose.yml +++ b/configuration/docker-compose.yml @@ -40,7 +40,7 @@ services: - SIMULATION_MODE=${SIMULATION_MODE:-false} - SIMULATION_IP=${SIMULATION_IP:-127.0.0.1} - SIMULATION_REGISTRATION_PORT=6767 - - LOCAL_IP=${LOCAL_IP:-127.0.0.1} + - LOCAL_IP=${V2XHUB_IP:-127.0.0.1} - TIME_SYNC_TOPIC=time_sync - TIME_SYNC_PORT=7575 - SIM_V2X_PORT=5757 diff --git a/configuration/initialization.sh b/configuration/initialization.sh index 82b556ebb..ba43e353a 100755 --- a/configuration/initialization.sh +++ b/configuration/initialization.sh @@ -23,9 +23,12 @@ 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]++') + # Displaying all available versions echo "Available versions:" -echo "$tags" +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