28 lines
647 B
Batchfile
28 lines
647 B
Batchfile
@echo off
|
|
REM Usage: post_build.bat <dist_dir>
|
|
set DIST_DIR=%~1
|
|
if "%DIST_DIR%"=="" (
|
|
echo Usage: %~nx0 path_to_dist
|
|
exit /b 1
|
|
)
|
|
if not exist "%DIST_DIR%" (
|
|
echo Target directory %DIST_DIR% does not exist
|
|
exit /b 1
|
|
)
|
|
set ROOT_DIR=%~dp0
|
|
copy /Y "%ROOT_DIR%\config.json" "%DIST_DIR%\config.json" >nul
|
|
if errorlevel 1 (
|
|
echo Failed to copy config.json
|
|
exit /b 1
|
|
)
|
|
if not exist "%DIST_DIR%\scheduler" (
|
|
mkdir "%DIST_DIR%\scheduler"
|
|
)
|
|
xcopy /Y /E "%ROOT_DIR%\scheduler" "%DIST_DIR%\scheduler" >nul
|
|
if errorlevel 1 (
|
|
echo Failed to copy scheduler scripts
|
|
exit /b 1
|
|
)
|
|
echo Deploy assets copied to %DIST_DIR%
|
|
exit /b 0
|