18 lines
613 B
Batchfile
18 lines
613 B
Batchfile
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 .. |