Fix deploy script: add NT8.Strategies.dll to deployment pipeline
Some checks failed
Build and Test / build (push) Has been cancelled
Some checks failed
Build and Test / build (push) Has been cancelled
This commit is contained in:
@@ -10,6 +10,7 @@ set "NT8_CUSTOM=%USERPROFILE%\Documents\NinjaTrader 8\bin\Custom"
|
||||
set "NT8_STRATEGIES=%NT8_CUSTOM%\Strategies"
|
||||
set "CORE_BIN=%PROJECT_ROOT%\src\NT8.Core\bin\Release\net48"
|
||||
set "ADAPTERS_BIN=%PROJECT_ROOT%\src\NT8.Adapters\bin\Release\net48"
|
||||
set "STRATEGIES_BIN=%PROJECT_ROOT%\src\NT8.Strategies\bin\Release\net48"
|
||||
set "WRAPPERS_SRC=%PROJECT_ROOT%\src\NT8.Adapters\Wrappers"
|
||||
set "BACKUP_ROOT=%SCRIPT_DIR%backups"
|
||||
|
||||
@@ -40,6 +41,13 @@ if not exist "%ADAPTERS_BIN%\NT8.Adapters.dll" (
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%STRATEGIES_BIN%\NT8.Strategies.dll" (
|
||||
echo ERROR: Strategies DLL not found: %STRATEGIES_BIN%\NT8.Strategies.dll
|
||||
echo Build release artifacts first:
|
||||
echo dotnet build NT8-SDK.sln --configuration Release
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%NT8_STRATEGIES%" (
|
||||
mkdir "%NT8_STRATEGIES%"
|
||||
)
|
||||
@@ -52,6 +60,7 @@ mkdir "%BACKUP_ROOT%\%STAMP%" >nul 2>&1
|
||||
echo Backing up existing NT8 SDK files...
|
||||
if exist "%NT8_CUSTOM%\NT8.Core.dll" copy /Y "%NT8_CUSTOM%\NT8.Core.dll" "%BACKUP_DIR%\NT8.Core.dll" >nul
|
||||
if exist "%NT8_CUSTOM%\NT8.Adapters.dll" copy /Y "%NT8_CUSTOM%\NT8.Adapters.dll" "%BACKUP_DIR%\NT8.Adapters.dll" >nul
|
||||
if exist "%NT8_CUSTOM%\NT8.Strategies.dll" copy /Y "%NT8_CUSTOM%\NT8.Strategies.dll" "%BACKUP_DIR%\NT8.Strategies.dll" >nul
|
||||
if exist "%NT8_STRATEGIES%\BaseNT8StrategyWrapper.cs" copy /Y "%NT8_STRATEGIES%\BaseNT8StrategyWrapper.cs" "%BACKUP_DIR%\BaseNT8StrategyWrapper.cs" >nul
|
||||
if exist "%NT8_STRATEGIES%\SimpleORBNT8Wrapper.cs" copy /Y "%NT8_STRATEGIES%\SimpleORBNT8Wrapper.cs" "%BACKUP_DIR%\SimpleORBNT8Wrapper.cs" >nul
|
||||
|
||||
@@ -59,6 +68,7 @@ echo Deployment manifest > "%MANIFEST_FILE%"
|
||||
echo Timestamp: %STAMP%>> "%MANIFEST_FILE%"
|
||||
echo Source Core DLL: %CORE_BIN%\NT8.Core.dll>> "%MANIFEST_FILE%"
|
||||
echo Source Adapters DLL: %ADAPTERS_BIN%\NT8.Adapters.dll>> "%MANIFEST_FILE%"
|
||||
echo Source Strategies DLL: %STRATEGIES_BIN%\NT8.Strategies.dll>> "%MANIFEST_FILE%"
|
||||
echo Destination Custom Folder: %NT8_CUSTOM%>> "%MANIFEST_FILE%"
|
||||
echo Destination Strategies Folder: %NT8_STRATEGIES%>> "%MANIFEST_FILE%"
|
||||
|
||||
@@ -75,6 +85,12 @@ if errorlevel 1 (
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
copy /Y "%STRATEGIES_BIN%\NT8.Strategies.dll" "%NT8_CUSTOM%\NT8.Strategies.dll" >nul
|
||||
if errorlevel 1 (
|
||||
echo ERROR: Failed to copy NT8.Strategies.dll
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Deploying wrapper sources...
|
||||
copy /Y "%WRAPPERS_SRC%\BaseNT8StrategyWrapper.cs" "%NT8_STRATEGIES%\BaseNT8StrategyWrapper.cs" >nul
|
||||
if errorlevel 1 (
|
||||
@@ -112,6 +128,11 @@ if not exist "%NT8_CUSTOM%\NT8.Adapters.dll" (
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%NT8_CUSTOM%\NT8.Strategies.dll" (
|
||||
echo ERROR: Verification failed for NT8.Strategies.dll
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%NT8_STRATEGIES%\BaseNT8StrategyWrapper.cs" (
|
||||
echo ERROR: Verification failed for BaseNT8StrategyWrapper.cs
|
||||
exit /b 1
|
||||
@@ -133,4 +154,3 @@ echo 2. Open NinjaScript Editor and press F5 (Compile).
|
||||
echo 3. Verify strategies appear in the Strategies list.
|
||||
|
||||
exit /b 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user