begin develop configloader
This commit is contained in:
@@ -1,7 +1,30 @@
|
||||
@echo off
|
||||
setlocal EnableExtensions
|
||||
|
||||
set "ps1=A:\1 Amazon_Active_Projects\3 ProjectStructure\UpdateSequences.ps1"
|
||||
set "script_dir=%~dp0"
|
||||
set "config_loader=%script_dir%ConfigLoader.ps1"
|
||||
set "config_path=%script_dir%config.json"
|
||||
|
||||
if not exist "%config_loader%" (
|
||||
echo [ERROR] ConfigLoader.ps1 not found next to UpdateSequences.bat.
|
||||
echo Please run UpgradeSeqBatches.ps1 to refresh helper files.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%config_path%" (
|
||||
echo [ERROR] config.json not found next to UpdateSequences.bat.
|
||||
echo Please run UpgradeSeqBatches.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"
|
||||
|
||||
if not defined ps1 (
|
||||
echo [ERROR] Unable to resolve UpdateSequences.ps1 path from config.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Running PowerShell update script...
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File "%ps1%"
|
||||
set "rc=%errorlevel%"
|
||||
|
||||
Reference in New Issue
Block a user