refactor ConfigLoader to CfgDeploy
This commit is contained in:
+8
-8
@@ -15,11 +15,11 @@ if not defined STRUCT_DIR (
|
||||
:: Debug: Show discovered structDir
|
||||
echo Found ProjectStructure directory: %STRUCT_DIR%
|
||||
|
||||
:: Locate ConfigLoader.ps1 in the ProjectStructure directory
|
||||
set "CONFIG_LOADER=%STRUCT_DIR%\ConfigLoader.ps1"
|
||||
:: Locate CfgDeploy.ps1 in the ProjectStructure directory
|
||||
set "CFG_DEPLOY=%STRUCT_DIR%\CfgDeploy.ps1"
|
||||
|
||||
if not exist "%CONFIG_LOADER%" (
|
||||
echo [ERROR] ConfigLoader.ps1 not found at: %CONFIG_LOADER%
|
||||
if not exist "%CFG_DEPLOY%" (
|
||||
echo [ERROR] CfgDeploy.ps1 not found at: %CFG_DEPLOY%
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
@@ -61,7 +61,7 @@ mkdir "%projectRoot%\Pr\RnR\RIFE"
|
||||
:: Add project root additions
|
||||
if not exist "%projectRoot%\Renders" mkdir "%projectRoot%\Renders"
|
||||
|
||||
:: Place helper scripts into Renders (config lives in .config\, deployed by ConfigLoader below)
|
||||
:: Place helper scripts into Renders (config lives in .config\, deployed by CfgDeploy below)
|
||||
set "templateRoot=%STRUCT_DIR%"
|
||||
for %%F in (UpdateSequences.bat ZipSeqArchv.bat UnzipSeqArchv.bat CompressPNGs.bat) do (
|
||||
if exist "%templateRoot%\%%F" copy /Y "%templateRoot%\%%F" "%projectRoot%\Renders\%%F" >nul
|
||||
@@ -79,13 +79,13 @@ git add . -v
|
||||
git commit -m "init"
|
||||
popd >nul
|
||||
|
||||
:: Deploy config workflow using ConfigLoader.ps1
|
||||
:: Deploy config workflow using CfgDeploy.ps1
|
||||
echo.
|
||||
echo Deploying config workflow...
|
||||
for %%P in ("%projectRoot%") do set "PROJECT_ROOT_ABS=%%~fP"
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%CONFIG_LOADER%' -ProjectPath '%PROJECT_ROOT_ABS%'"
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%CFG_DEPLOY%' -ProjectPath '%PROJECT_ROOT_ABS%'"
|
||||
if errorlevel 1 (
|
||||
echo [WARNING] Config workflow deployment failed. You may need to run ConfigLoader.ps1 manually.
|
||||
echo [WARNING] Config workflow deployment failed. You may need to run CfgDeploy.ps1 manually.
|
||||
) else (
|
||||
echo Config workflow deployed successfully.
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user