1
0
mirror of https://github.com/arkuznetsov/1CFilesConverter.git synced 2024-11-28 08:49:00 +02:00

feat: Добавлена обработка кодов возврата при выполнении вызываемых инструментов.

This commit is contained in:
Artem Kuznetsov 2023-10-05 09:35:44 +03:00
parent 79898211bc
commit 0e1f1b6852
11 changed files with 63 additions and 4 deletions

View File

@ -150,6 +150,10 @@ IF not defined V8_RING_TOOL (
goto finally
)
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
goto finally
)
:export_xml
@ -165,6 +169,10 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
echo [INFO] Creating infobase "%IB_PATH%" with configuration from XML-files "%XML_PATH%"...
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --import="%XML_PATH%"
)
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
goto finally
)
:export_ib
@ -178,6 +186,7 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
%IBCMD_TOOL% infobase config save --db-path="%IB_PATH%" --user="%V8_IB_USER%" --password="%V8_IB_PWD%" "%V8_DST_PATH%"
)
)
set ERROR_CODE=%ERRORLEVEL%
:finally

View File

@ -145,6 +145,10 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --load="%V8_SRC_PATH%"
)
)
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
goto finally
)
:export_ib
@ -161,6 +165,10 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" --user="%V8_IB_USER%" --password="%V8_IB_PWD%" "%XML_PATH%" --force
)
)
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
goto finally
)
:export_xml
@ -178,6 +186,7 @@ IF not defined V8_RING_TOOL (
goto finally
)
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace import --project "%V8_DST_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
set ERROR_CODE=%ERRORLEVEL%
:finally

View File

@ -178,6 +178,10 @@ IF not defined V8_RING_TOOL (
goto finally
)
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
goto finally
)
:export_xml
@ -207,7 +211,7 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
)
)
)
set ERROR_CODE=%ERRORLEVEL%
goto finally
:export_cf
@ -239,6 +243,9 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
)
)
)
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
)
:finally

View File

@ -143,6 +143,10 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
%IBCMD_TOOL% infobase create --db-path="%IB_PATH%" --create-database --load="%V8_SRC_PATH%"
)
)
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
goto finally
)
:export_ib
@ -156,7 +160,7 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" --user="%V8_IB_USER%" --password="%V8_IB_PWD%" "%V8_DST_PATH%" --force
)
)
set ERROR_CODE=%ERRORLEVEL%
goto finally
:export_edt
@ -176,6 +180,7 @@ IF not defined V8_RING_TOOL (
goto finally
)
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%V8_DST_PATH%" --workspace-location "%WS_PATH%"
set ERROR_CODE=%ERRORLEVEL%
:finally

View File

@ -191,6 +191,10 @@ md "%XML_PATH%"
FOR /F "delims=" %%f IN ('dir /b /a-d %V8_SRC_MASK%') DO (
echo [INFO] Building %%~nf...
%V8_TOOL% DESIGNER /IBConnectionString %V8_BASE_IB_CONNECTION% /N"%V8_IB_USER%" /P"%V8_IB_PWD%" /DisableStartupDialogs /DumpExternalDataProcessorOrReportToFiles "%XML_PATH%" "%V8_SRC_FOLDER%\%%~nxf"
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
goto finally
)
)
:export_xml
@ -209,6 +213,7 @@ IF not defined V8_RING_TOOL (
goto finally
)
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace import --project "%V8_DST_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
set ERROR_CODE=%ERRORLEVEL%
:finally

View File

@ -196,6 +196,10 @@ IF not defined V8_RING_TOOL (
goto finally
)
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
goto finally
)
:export_xml
@ -218,6 +222,7 @@ IF "%V8_SRC_IS_EDT%" equ "1" (
%V8_TOOL% DESIGNER /IBConnectionString %V8_BASE_IB_CONNECTION% /N"%V8_IB_USER%" /P"%V8_IB_PWD%" /DisableStartupDialogs /LoadExternalDataProcessorOrReportFromFiles "%XML_PATH%\%%~nxf" "%V8_DST_PATH%"
)
)
set ERROR_CODE=%ERRORLEVEL%
:finally

View File

@ -186,7 +186,7 @@ FOR /F "delims=" %%f IN ('dir /b /a-d %V8_SRC_MASK%') DO (
echo [INFO] Building %%~nf...
%V8_TOOL% DESIGNER /IBConnectionString %V8_BASE_IB_CONNECTION% /N"%V8_IB_USER%" /P"%V8_IB_PWD%" /DisableStartupDialogs /DumpExternalDataProcessorOrReportToFiles "%V8_DST_PATH%\%%~nf.xml" "%V8_SRC_FOLDER%\%%~nxf"
)
set ERROR_CODE=%ERRORLEVEL%
goto finally
:export_xml
@ -206,6 +206,9 @@ IF not defined V8_RING_TOOL (
goto finally
)
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%V8_DST_PATH%" --workspace-location "%WS_PATH%"
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
)
:finally

View File

@ -138,6 +138,7 @@ IF not defined V8_RING_TOOL (
goto finally
)
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace validate --project-list "%VALIDATE_PATH%" --workspace-location "%WS_PATH%" --file "%REPORT_FILE%"
set ERROR_CODE=%ERRORLEVEL%
:finally

View File

@ -202,6 +202,10 @@ IF not defined V8_RING_TOOL (
goto finally
)
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%"
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
goto finally
)
:export_xml
@ -215,6 +219,10 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
%IBCMD_TOOL% infobase config import --db-path="%IB_PATH%" --user="%V8_IB_USER%" --password="%V8_IB_PWD%" --extension=%V8_EXT_NAME% "%XML_PATH%"
)
)
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
goto finally
)
:export_ib
@ -228,6 +236,7 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
%IBCMD_TOOL% infobase config save --db-path="%IB_PATH%" --user="%V8_IB_USER%" --password="%V8_IB_PWD%" --extension=%V8_EXT_NAME% "%V8_DST_PATH%"
)
)
set ERROR_CODE=%ERRORLEVEL%
:finally

View File

@ -207,6 +207,10 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" --user="%V8_IB_USER%" --password="%V8_IB_PWD%" --extension=%V8_EXT_NAME% --force "%XML_PATH%"
)
)
IF not ERRORLEVEL 0 (
set ERROR_CODE=%ERRORLEVEL%
goto finally
)
:export_xml
@ -225,6 +229,7 @@ IF not defined V8_RING_TOOL (
goto finally
)
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace import --project "%V8_DST_PATH%" --configuration-files "%XML_PATH%" --workspace-location "%WS_PATH%" --version "%V8_VERSION%"
set ERROR_CODE=%ERRORLEVEL%
:finally

View File

@ -205,7 +205,7 @@ IF "%V8_CONVERT_TOOL%" equ "designer" (
%IBCMD_TOOL% infobase config export --db-path="%IB_PATH%" --user="%V8_IB_USER%" --password="%V8_IB_PWD%" --extension=%V8_EXT_NAME% --force "%V8_DST_PATH%"
)
)
set ERROR_CODE=%ERRORLEVEL%
goto finally
:export_edt
@ -225,6 +225,7 @@ IF not defined V8_RING_TOOL (
goto finally
)
call %V8_RING_TOOL% edt%V8_EDT_VERSION% workspace export --project "%V8_SRC_PATH%" --configuration-files "%V8_DST_PATH%" --workspace-location "%WS_PATH%"
set ERROR_CODE=%ERRORLEVEL%
:finally