From f9f7d3ce20576341e08ac9ccd9ed64e452f59c99 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Fri, 15 Dec 2023 20:43:02 +0100 Subject: [PATCH] WORKFLOW: fixed version checker --- automation_tools/main_version_checker.sh | 1 - automation_tools/version_extractor.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/automation_tools/main_version_checker.sh b/automation_tools/main_version_checker.sh index 87011bfd..b5c68269 100755 --- a/automation_tools/main_version_checker.sh +++ b/automation_tools/main_version_checker.sh @@ -7,7 +7,6 @@ source automation_tools/version_extractor.sh # Set the file paths appdata="net.retrodeck.retrodeck.appdata.xml" manifest="net.retrodeck.retrodeck.yml" -manifest_content=$(cat "$manifest") compare_versions() { local manifest_version_cleaned=$(echo "$1" | sed 's/[a-zA-Z]//g') diff --git a/automation_tools/version_extractor.sh b/automation_tools/version_extractor.sh index b9f679ff..4838826b 100755 --- a/automation_tools/version_extractor.sh +++ b/automation_tools/version_extractor.sh @@ -29,6 +29,6 @@ fetch_manifest_version(){ # Use awk to extract the value of the first iteration of VERSION variable manifest_version=$(echo "$manifest_content" | awk '/VERSION=/ && !/#/ { sub(/.*VERSION=/, ""); sub(/#.*/, ""); print; exit }') # Trim leading and trailing whitespace - manifest_version=$(echo "$manifest_version" | awk '{$1=$1;print}') + manifest_version=$(echo "$manifest_version" | awk '{gsub(/[^0-9.a-zA-Z]/,""); print}') echo "$manifest_version" }