From 8e1a2ffd168d2f7f0adc754d96e9de957b8bbe39 Mon Sep 17 00:00:00 2001 From: Matthew Clark <43628254+mon5termatt@users.noreply.github.com> Date: Wed, 8 Nov 2023 20:10:41 -0600 Subject: [PATCH] Add files via upload --- update.bat | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/update.bat b/update.bat index 531d799..1a3a0c1 100644 --- a/update.bat +++ b/update.bat @@ -23,8 +23,11 @@ DEL "MediCat_Installer.bat" 2>nul cls echo.Updating Medicat Installer. Please wait while the new file is downloaded. -curl http://url.medicatusb.com/installerupdate -o Medicat_Installer.bat -q -L - +powershell -c "$data = curl https://api.github.com/repos/mon5termatt/medicat_installer/git/refs/tag -UseBasicParsing | ConvertFrom-Json; $data[-1].ref -replace 'refs/tags/', '' | Out-File -Encoding 'UTF8' -FilePath './ver.ini'" +set /p ver= < ver.ini +set ver=%ver:~-4% +del ver.ini /Q +curl https://github.com/mon5termatt/medicat_installer/releases/download/%remver%/Medicat_Installer.bat -o Medicat_Installer.bat -q -L REM Check if the download was successful IF NOT EXIST "Medicat_Installer.bat" ( echo ERROR: Failed to download the new file.