Changed check_new_version to more lightweight format. Inform only, no download
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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,9 +104,10 @@ 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(
|
||||
|
||||
Reference in New Issue
Block a user