判断是否成功,失败了直接退出,后续命令不再执行
@echo off git pull if %errorlevel%==0 (dotnet publish -c Release) else (goto :eof) :: 后续命令...
(完)