WORKFLOW: fixed version checker

This commit is contained in:
XargonWan 2023-12-15 20:43:02 +01:00
parent df05595afc
commit f9f7d3ce20
2 changed files with 1 additions and 2 deletions

View file

@ -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')

View file

@ -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"
}