further deployment implementation to .config directory
This commit is contained in:
@@ -2,23 +2,26 @@
|
||||
setlocal EnableExtensions
|
||||
|
||||
set "script_dir=%~dp0"
|
||||
set "config_loader=%script_dir%ConfigLoader.ps1"
|
||||
set "config_path=%script_dir%config.json"
|
||||
for %%I in ("%script_dir%..") do set "PROJ_ROOT=%%~fI"
|
||||
|
||||
if not exist "%config_loader%" (
|
||||
echo [ERROR] ConfigLoader.ps1 not found next to UpdateSequences.bat.
|
||||
set "CONFIG_DIR=%PROJ_ROOT%\.config"
|
||||
set "CONFIG_PATH=%CONFIG_DIR%\config.json"
|
||||
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
|
||||
|
||||
if not exist "%CONFIG_PATH%" (
|
||||
echo [ERROR] config.json not found at %CONFIG_PATH%
|
||||
echo Please run UpdateProjectBatches.ps1 to refresh helper files.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%config_path%" (
|
||||
echo [ERROR] config.json not found next to UpdateSequences.bat.
|
||||
if not exist "%GET_STRUCT_DIR%" (
|
||||
echo [ERROR] GetStructDir.ps1 not found at %GET_STRUCT_DIR%
|
||||
echo Please run UpdateProjectBatches.ps1 to refresh helper files.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
||||
"Set-StrictMode -Version Latest; $loader = Resolve-Path -LiteralPath '%config_loader%' -ErrorAction Stop; . $loader.Path; $ps1Path = Join-Path (Get-StructDirectory) 'UpdateSequences.ps1'; if (-not (Test-Path -LiteralPath $ps1Path)) { throw \"UpdateSequences.ps1 not found at $ps1Path\" }; Write-Output $ps1Path"`) do set "ps1=%%I"
|
||||
"Set-StrictMode -Version Latest; $structDir = & '%GET_STRUCT_DIR%' -ProjectRoot '%PROJ_ROOT%'; if (-not $structDir) { throw \"Failed to get structDir from GetStructDir.ps1\" }; $ps1Path = Join-Path $structDir 'UpdateSequences.ps1'; if (-not (Test-Path -LiteralPath $ps1Path)) { throw \"UpdateSequences.ps1 not found at $ps1Path\" }; Write-Output $ps1Path"`) do set "ps1=%%I"
|
||||
|
||||
if not defined ps1 (
|
||||
echo [ERROR] Unable to resolve UpdateSequences.ps1 path from config.
|
||||
|
||||
Reference in New Issue
Block a user