HiNC-Manager-Win/HiNC-update.bat
2025-08-15 14:55:23 +08:00

18 lines
613 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

cd /D "%~dp0."
set "git=%~dp0PortableGit/bin/git.exe"
set "remoteRepo=https://HiNC-Public-Client:HiNCProduct20241117@superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-Win-Product.git"
"%git%" clone "%remoteRepo%" HiNC
cd HiNC
"%git%" remote set-url origin "%remoteRepo%"
rem 僅保留 appsettings.json本次更新其餘內容均以遠端為準
set "APP_FILE=appsettings.json"
set "APP_BAK=%~dp0appsettings.json.bak"
if exist "%APP_FILE%" copy /Y "%APP_FILE%" "%APP_BAK%"
"%git%" fetch --all
"%git%" reset --hard origin/master
"%git%" clean -fd
if exist "%APP_BAK%" copy /Y "%APP_BAK%" "%APP_FILE%"
cd ..