From a0fe34abf79f92dd5bbb018472173c132904de73 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 31 Aug 2023 10:07:24 +0200 Subject: [PATCH] Updated version extractor [skip ci] --- automation_tools/version_extractor.sh | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 automation_tools/version_extractor.sh diff --git a/automation_tools/version_extractor.sh b/automation_tools/version_extractor.sh new file mode 100755 index 00000000..a76154f5 --- /dev/null +++ b/automation_tools/version_extractor.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Set the file paths +appdata="net.retrodeck.retrodeck.appdata.xml" +manifest="net.retrodeck.retrodeck.yml" +manifest_content=$(cat "$manifest") + +# Getting latest RetroDECK release info +LATEST_RELEASE=$(curl -s "https://api.github.com/repos/XargonWan/RetroDECK/releases/latest") +# Extracting tag name from the latest release +TAG=$(echo "$LATEST_RELEASE" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') +# Printing results +echo "repo: $TAG" + +# Extract the version from the net.retrodeck.retrodeck.appdata.xml file +appdata_version=$(grep -oPm1 "(?<=