Files
UnrealEngineUWP/Engine/Plugins/VirtualProduction/RemoteControlWebInterface/WebApp/Clean.bat
Alejandro Arango 27cba962b5 VirtualProduction: Merged from RES.
#rb
#jira
#rnx

[CL 17223658 by Alejandro Arango in ue5-main branch]
2021-08-18 18:05:16 -04:00

34 lines
1.0 KiB
Batchfile
Executable File

@echo off
call :DEL_PROJECT_FILES .\
call :DEL_FOLDERS .\node_modules
call :DEL_PROJECT_FILES .\Client
call :DEL_FOLDERS .\Client\build
call :DEL_FOLDERS .\Client\node_modules
call :DEL_PROJECT_FILES .\Server
call :DEL_FOLDERS .\Server\build
call :DEL_FOLDERS .\Server\node_modules
call :DEL_FOLDERS .\Server\public
goto :EOF
:DEL_FOLDERS
REM Using Robocopy instead of rmdir
REM as node_modules may contains really long file path, and rmdir fails to delete them
echo Deleting %~1
if not exist empty\ mkdir empty
robocopy empty "%~1" /mir > nul
rmdir /q /s "%~1"
rmdir /q /s empty
goto :EOF
:DEL_PROJECT_FILES
REM Files are marked as readonly because of perforce
REM Node v16 fails to install dependencies because it tries to overwrite the file
REM if we force node to skip it, earlier versions of node will fail if we do that
REM so we have original files prefixed with _, at build they are being copied and the readonly attribute is removed
del /f /q "%~1\package.json"
del /f /q "%~1\package-lock.json"
goto :EOF