From 35141cd0686566c8c1ee84574792268525a1609c Mon Sep 17 00:00:00 2001
From: Zoria <50277488+THZoria@users.noreply.github.com>
Date: Sat, 24 Jan 2026 21:25:42 +0100
Subject: [PATCH] Enhance firmware version check for Switch 1
Updated the firmware version check to include version 21.0.0 and modified output messages for clarity.
---
.github/workflows/firmware-autodl.yml | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/firmware-autodl.yml b/.github/workflows/firmware-autodl.yml
index 1a85dc3..9b8a838 100644
--- a/.github/workflows/firmware-autodl.yml
+++ b/.github/workflows/firmware-autodl.yml
@@ -31,33 +31,34 @@ jobs:
cp hactool-linux hactool
chmod +x hactool
- - name: đ Check firmware version (Switch 1 only)
+ - name: đ Check firmware version (Switch 1 only, 21.0.0+)
id: version_check
run: |
LATEST_TITLE=$(curl -s 'https://yls8.mtheall.com/ninupdates/feed.php' | \
grep '
Switch ' | \
grep -v 'Switch 2 ' | \
+ grep -E 'Switch ([2-9][1-9]|[3-9][0-9])\.' | \
head -n 1)
LATEST_VERSION=$(echo "$LATEST_TITLE" | grep -oP 'Switch \K[0-9.]+')
if [ -z "$LATEST_VERSION" ]; then
- echo "ERREUR: Impossible de récupérer la version."
- exit 1
+ echo "INFO: Aucune version récente (>= 21.x) trouvée."
+ echo "new_version=false" >> $GITHUB_OUTPUT
+ exit 0
fi
- echo "Version sur le flux RSS : $LATEST_VERSION"
+ echo "Version détectée : $LATEST_VERSION"
- # Vérification via l'API GitHub si la release existe
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/tags/$LATEST_VERSION")
if [ "$HTTP_STATUS" == "200" ]; then
- echo "INFO: La release $LATEST_VERSION existe déjà . On stoppe tout."
+ echo "INFO: La release $LATEST_VERSION existe déjà ."
echo "new_version=false" >> $GITHUB_OUTPUT
else
- echo "INFO: Nouvelle version détectée : $LATEST_VERSION"
+ echo "INFO: Nouvelle version $LATEST_VERSION détectée !"
echo "new_version=true" >> $GITHUB_OUTPUT
fi
shell: bash