diff options
author | Jacek Blaszczynski <biosciencenow@outlook.com> | 2017-11-06 17:49:59 +0100 |
---|---|---|
committer | Jacek Blaszczynski <biosciencenow@outlook.com> | 2017-11-06 17:49:59 +0100 |
commit | 4148d6abf1a4ea3c98431fa99cb9a02baabb1b98 (patch) | |
tree | 6d0de9ad1c53eae24335a1f6e7511686b7f99f06 | |
parent | 4be1b4b90f17418e5784a269cc5214efe24a5afa (diff) | |
download | coreclr-4148d6abf1a4ea3c98431fa99cb9a02baabb1b98.tar.gz coreclr-4148d6abf1a4ea3c98431fa99cb9a02baabb1b98.tar.bz2 coreclr-4148d6abf1a4ea3c98431fa99cb9a02baabb1b98.zip |
Improve clean.cmd by adding VBCScompiler.exe kill logic and git clean -xdf cleanup
-rw-r--r-- | clean.cmd | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -11,6 +11,7 @@ if [%1]==[] ( set bin=true set packages=true set tools=true + set all=false goto Begin ) @@ -42,6 +43,7 @@ if /I [%1] == [-all] ( set tools=true set bin=true set packages=true + set all=true goto Begin ) @@ -56,6 +58,13 @@ set "__ProjectDir=%~dp0" if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%" set "__RootBinDir=%__ProjectDir%\bin" +:: Check if VBCSCompiler.exe is running and stop it +tasklist /fi "imagename eq VBCSCompiler.exe" |find ":" > nul +if errorlevel 1 ( + echo Stop VBCSCompiler.exe execution. + for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F +) + if [%bin%] == [true] ( if exist "%__RootBinDir%" ( echo Deleting bin directory @@ -89,6 +98,12 @@ if [%packages%] == [true] ( ) ) +if [%all%] == [true] ( + echo Cleaning entire working directory ... + call git clean -xdf + exit /b !ERRORLEVEL! +) + echo Clean was successful exit /b 0 @@ -99,7 +114,7 @@ echo Options: echo -b - Cleans the bin directory echo -p - Cleans the packages directory echo -t - Cleans the tools directory -echo -all - Cleans everything +echo -all - Cleans everything and restores repository to pristine state echo. echo If no option is specified then clean.cmd -b -p -t is implied. exit /b
\ No newline at end of file |