From e7a5da16d59390e1ece0bef663506ed806383181 Mon Sep 17 00:00:00 2001 From: nathan smith Date: Wed, 2 Jul 2025 20:47:55 +0100 Subject: [PATCH] Adding more safety checks to updater --- cosmic rage/worlds/plugins/CosmicRage.xml | 2 +- updator.bat | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cosmic rage/worlds/plugins/CosmicRage.xml b/cosmic rage/worlds/plugins/CosmicRage.xml index 107e434..49545b2 100644 --- a/cosmic rage/worlds/plugins/CosmicRage.xml +++ b/cosmic rage/worlds/plugins/CosmicRage.xml @@ -78,7 +78,7 @@ function RegisterMushClient(name, line, wildcards) end -- Define the latest soundpack version here -CURRENT_SP_VERSION = 2 +CURRENT_SP_VERSION = 3 function CheckSoundpackVersion(name, line, wildcards, styles) local user_version = tonumber(wildcards.user_version) diff --git a/updator.bat b/updator.bat index 9e13126..3062845 100644 --- a/updator.bat +++ b/updator.bat @@ -42,6 +42,13 @@ set "MCL_FILE=cosmic rage\worlds\cosmic rage\cosmic rage.mcl" if exist "%MAIN_REPO_DIR%\%MCL_FILE%" ( %GIT_CMD% -C "%MAIN_REPO_DIR%" update-index --assume-unchanged "%MCL_FILE%" echo [%DATE% %TIME%] Marked %MCL_FILE% as assume-unchanged. >> "%LOG_FILE%" + if errorlevel 1 ( + echo [%DATE% %TIME%] WARNING: Failed to mark %MCL_FILE% as assume-unchanged. Will proceed without excluding it. >> "%LOG_FILE%" + echo WARNING: Could not mark %MCL_FILE% as assume-unchanged. + %GIT_CMD% -C "%MAIN_REPO_DIR%" update-index --no-assume-unchanged "%MCL_FILE%" >nul 2>&1 + ) else ( + echo [%DATE% %TIME%] Marked %MCL_FILE% as assume-unchanged. >> "%LOG_FILE%" + ) ) else ( echo [%DATE% %TIME%] WARNING: %MCL_FILE% not found, skipping assume-unchanged. >> "%LOG_FILE%" )