diff --git a/.gitignore b/.gitignore index e65967d..3f34223 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ # Ignore all files *.* -# Except +# File Types !*.mps !*.dat !*.json @@ -16,12 +16,15 @@ !*.ks !*.tjs !*.yaml -!Data/* !*.rb + +# Other Needed Files +!Data/* !.gitignore !README.md +!UPDATE.bat -!# Images +# Images !gauge_frame.png_ !ornament_frame2ー2.png_ !メニュー背景用.png_ \ No newline at end of file diff --git a/UPDATE.bat b/UPDATE.bat new file mode 100644 index 0000000..0cca32e --- /dev/null +++ b/UPDATE.bat @@ -0,0 +1,72 @@ +@echo off +setlocal enabledelayedexpansion + +REM Check if patch-config.txt exists +if not exist patch-config.txt ( + echo "Config file (patch-config.txt) not found! Assuming no patching needed." + exit /b +) + +REM Read configuration from file +for /f "tokens=1,2 delims==" %%a in (patch-config.txt) do ( + if "%%a"=="username" set "username=%%b" + if "%%a"=="repo" set "repo=%%b" + if "%%a"=="branch" set "branch=%%b" +) + +REM Get the latest hash +echo "Getting latest commit SHA hash" +powershell -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 + +REM Read the latest SHA from the file +set /p latest_patch_sha= previous_patch_sha.txt +endlocal +exit /b \ No newline at end of file diff --git a/patch-config.txt b/patch-config.txt new file mode 100644 index 0000000..ad2ec68 --- /dev/null +++ b/patch-config.txt @@ -0,0 +1,3 @@ +username=DazedMTL +repo=Academy-Nymphomania +branch=main \ No newline at end of file