Update patch

This commit is contained in:
DazedAnon 2024-07-01 18:40:58 -05:00
parent 1998626184
commit f11948cdad
2 changed files with 4 additions and 4 deletions

View file

@ -1,3 +1,3 @@
username=DazedMTL
repo=Her-Examination
username=dazed-translations
repo=holy-knight-cecilia
branch=main

View file

@ -43,7 +43,7 @@ for /f "tokens=1,2 delims==" %%a in (patch-config.txt) do (
REM Get the latest hash
echo "Getting latest commit SHA hash"
!_my_shell! -Command "(Invoke-WebRequest -Uri 'https://api.github.com/repos/%username%/%repo%/branches/%branch%').Content | ConvertFrom-Json | Select-Object -ExpandProperty commit | Select-Object -ExpandProperty sha" > latest_patch_sha.txt
!_my_shell! -Command "(Invoke-WebRequest -Uri 'https://gitgud.io/%username%/projects/:id/repository/commits/:sha').Content | ConvertFrom-Json | Select-Object -ExpandProperty commit | Select-Object -ExpandProperty sha" > latest_patch_sha.txt
REM Read the latest SHA from the file
set /p latest_patch_sha=<latest_patch_sha.txt
@ -80,7 +80,7 @@ exit /b
:download_extract
REM Download zip file
echo "Downloading latest patch..."
!_my_shell! -Command "Invoke-WebRequest -Uri 'https://codeload.github.com/%username%/%repo%/zip/refs/heads/%branch%' -OutFile 'repo.zip'"
!_my_shell! -Command "Invoke-WebRequest -Uri 'https://gitgud.io/%username%/%repo%/-/archive/%branch%/%repo%-%branch%.zip' -OutFile 'repo.zip'"
if !errorlevel! neq 0 (
pause
exit /b