From d0fd8e9996267ebd10ef29a4546565a5ff22cb6a Mon Sep 17 00:00:00 2001 From: Frank Conrads Date: Tue, 16 Jun 2026 15:04:53 +0200 Subject: [PATCH] Changed check_new_version to more lightweight format. Inform only, no download --- check_new_version.bat | 39 +--------------------- latestversion.ini => check_new_version.ini | 4 +-- check_new_version.py | 9 ++--- 3 files changed, 8 insertions(+), 44 deletions(-) rename latestversion.ini => check_new_version.ini (56%) diff --git a/check_new_version.bat b/check_new_version.bat index 4de60b1..446ecc4 100644 --- a/check_new_version.bat +++ b/check_new_version.bat @@ -1,11 +1,7 @@ @echo off setlocal EnableExtensions EnableDelayedExpansion -set UPDATE_DIR=%~dp0updates -if not exist "%UPDATE_DIR%" mkdir "%UPDATE_DIR%" - set TMP_OUT=%TEMP%\update_check_%RANDOM%.txt -set TMP_OUT_2=%TEMP%\update_check_%RANDOM%.txt python check_new_version.py > "%TMP_OUT%" set EXITCODE=%ERRORLEVEL% @@ -23,39 +19,6 @@ if %EXITCODE%==0 ( echo. type "%TMP_OUT%" -choice /c jn /m "Wollen Sie die Updates-Packages herunterladen?" - -if errorlevel 2 goto :END - - -if exist "%TMP_OUT%" ( - - - findstr /b "PYTHON_DOWNLOAD=" "%TMP_OUT%" >nul - if not errorlevel 1 ( - for /f "tokens=1,* delims==" %%a in ( - 'findstr /b "PYTHON_DOWNLOAD=" "%TMP_OUT%"' - ) do ( - echo Downloading Python update from PYTHON_DOWNLOAD - powershell -NoProfile -Command ^ - "Invoke-WebRequest '%%b' -OutFile '%UPDATE_DIR%\python-embed.zip'" - ) - ) - - findstr /b "CAESIUM_DOWNLOAD=" "%TMP_OUT_2%" >nul - if not errorlevel 1 ( - for /f "tokens=1,* delims==" %%a in ( - 'findstr /b "CAESIUM_DOWNLOAD=" "%TMP_OUT_2%"' - ) do ( - echo Downloading caesiumclt update from CAESIUM_DOWNLOAD - - powershell -NoProfile -Command ^ - "Invoke-WebRequest '%%b' -OutFile '%UPDATE_DIR%\caesiumclt.zip'" - ) - ) -) - :END del "%TMP_OUT%" >nul 2>&1 -del "%TMP_OUT_2%" >nul 2>&1 -endlocal \ No newline at end of file +endlocal diff --git a/latestversion.ini b/check_new_version.ini similarity index 56% rename from latestversion.ini rename to check_new_version.ini index 95849a7..8f8eb6c 100644 --- a/latestversion.ini +++ b/check_new_version.ini @@ -1,6 +1,6 @@ [DEFAULT] -python_used_version = 3.14.5 -python_latest_version = 3.14.5 +python_used_version = 3.14.6 +python_latest_version = 3.14.6 caesiumclt_used_version = v1.3.0 caesiumclt_latest_version = v1.3.0 diff --git a/check_new_version.py b/check_new_version.py index aa00ae1..eada7a6 100644 --- a/check_new_version.py +++ b/check_new_version.py @@ -2,10 +2,11 @@ import argparse import configparser import json import sys +import os import urllib.request from pathlib import Path -INI_FILE = Path("latestversion.ini") +INI_FILE = Path("check_new_version.ini") PYTHON_API = "https://endoflife.date/api/v1/products/python" CAESIUM_API = "https://api.github.com/repos/Lymphatus/caesium-clt/tags" @@ -79,7 +80,6 @@ def check_caesium(cfg, result): ) }) - def main(): parser = argparse.ArgumentParser() parser.add_argument("--yes", action="store_true") @@ -104,10 +104,11 @@ def main(): for u in result["updates"]: print( f"{u['tool'].capitalize()}: aktuell genutzt {u['used']}, " - f"neu {u['latest']}, download?" + f"neu {u['latest']}" ) print(f"{u['tool'].upper()}_DOWNLOAD={u['url']}") - + print(f"{u['tool'].upper()}_LATEST_VERSION={u['latest']}") + if not u["maintained"]: print( f"WARNING: Achtung Version {u['latest']} "