task.json中build_and_run.cmd脚本
程序员文章站
2022-06-22 17:05:31
...
echo off
set task_name=%~n0
set PROJECTNAME=%1%
echo [--]enter %0 ...
cd %~dp0
echo [00]Create launch.json...
@python create_launch.py -f --it %PROJECTNAME%
echo [01]Building...
REM "%VSCODE_HOME%/plugins/dt/dtcenter/bin/ssh.exe" %SSH_HOST% "cd src;sh build.sh %PROJECTNAME% 2>&1 | tee outlog;sh run.sh %PROJECTNAME%"
"%VSCODE_HOME%/plugins/dt/dtcenter/bin/ssh.exe" %SSH_HOST% "cd test;sh build_and_run.sh %PROJECTNAME% 2>&1 | tee outlog;"
"%VSCODE_HOME%/plugins/dt/dtcenter/bin/scp.exe" %SSH_HOST%:outlog .
python log2json.py
echo [--]exit %0 ...
set exit_code=%errorlevel%
call %LOCAL_SRC_HOME%\.vscode\vscode_logger.cmd "Exit code: %exit_code%"
call %LOCAL_SRC_HOME%\.vscode\vscode_logger.cmd "Task %task_name% end."
echo on