File tree Expand file tree Collapse file tree 10 files changed +16
-10
lines changed
Expand file tree Collapse file tree 10 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 1+ REM Activate a virtual environment created by set_up_venv.bat. Also set the UV_TEMP_VENV var.
2+ REM this might be needed if ie. stop_ibex_server calls config_env and wipes env vars.
3+ set UV_TEMP_VENV = C:\Instrument\Var\tmp\.deployscriptvenv
4+ call %UV_TEMP_VENV% \scripts\activate
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ if "%DETECT_OLD_GALIL%" == "YES" (
8080)
8181
8282REM stop_ibex_server calls config_env which means we have to reactivate our venv
83- call %UV_TEMP_VENV% \scripts\activate
83+ call " %~dp0 _activate_venv.bat "
8484
8585call python " %~dp0 IBEX_upgrade.py" --release_dir " %SOURCE% " --release_suffix " %SUFFIX% " --server_arch %SERVER_ARCH% --confirm_step instrument_deploy_main
8686IF %errorlevel% neq 0 exit /b %errorlevel%
@@ -89,6 +89,8 @@ ENDLOCAL
8989start /i /wait cmd /c " %START_IBEX% "
9090
9191REM start_ibex_server calls config_env which means we have to reactivate our venv
92+ call " %~dp0 _activate_venv.bat"
93+
9294call python " %~dp0 IBEX_upgrade.py" --release_dir " %SOURCE% " --release_suffix " %SUFFIX% " --server_arch %SERVER_ARCH% --confirm_step instrument_deploy_post_start
9395call rmdir /s /q %UV_TEMP_VENV%
9496
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ IF EXIST "C:\Instrument\Apps\EPICS" (start /wait cmd /c "%STOP_IBEX%")
3838
3939
4040REM stop_ibex_server calls config_env which means we have to reactivate our venv
41- call %UV_TEMP_VENV% \scripts\activate
41+ call " %~dp0 _activate_venv.bat "
4242
4343call python " %~dp0 IBEX_upgrade.py" --release_dir " %SOURCE% " --release_suffix " %SUFFIX% " --server_arch %SERVER_ARCH% --confirm_step instrument_install
4444if %errorlevel% neq 0 goto ERROR
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ set "STOP_IBEX=C:\Instrument\Apps\EPICS\stop_ibex_server.bat"
2121IF EXIST " C:\Instrument\Apps\EPICS" (
2222 call " %STOP_IBEX% "
2323 REM stop_ibex_server calls config_env which means we have to reactivate our venv
24- call %UV_TEMP_VENV% \scripts\activate
24+ call " %~dp0 _activate_venv.bat "
2525) else (
2626 REM in case one has been left around running in the background
2727 taskkill /f /im caRepeater.exe
Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ if %errorlevel% neq 0 goto ERROR
88call " %LATEST_PYTHON% " " %~dp0 IBEX_upgrade.py" --release_dir " %SOURCE% " --confirm_step instrument_test
99if %errorlevel% neq 0 goto ERROR
1010
11- call " %~dp0 remove_genie_python.bat" %LATEST_PYTHON_DIR%
12-
1311call rmdir /s /q %UV_TEMP_VENV%
1412
1513exit /b 0
Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ call "%~dp0set_epics_ca_addr_list.bat"
55call " %~dp0 install_or_update_uv.bat"
66call " %~dp0 set_up_venv.bat"
77IF %errorlevel% neq 0 EXIT /b %errorlevel%
8- call cd " %~dp0 "
9- @ REM Uses Python from the Shares, set as LATEST_PYTHON
108call python " %~dp0 ibex_install_utils\tasks\backup_tasks.py"
119call rmdir /s /q %UV_TEMP_VENV%
1210endlocal
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ set "START_IBEX=C:\Instrument\Apps\EPICS\start_ibex_server"
1111
1212start /wait cmd /c " %STOP_IBEX% "
1313
14- call " %LATEST_PYTHON% " -u " %~dp0 IBEX_upgrade.py" --release_dir " %SOURCE% " --release_suffix " %SUFFIX% " --confirm_step force_upgrade_mysql
14+ call " %~dp0 _activate_venv.bat"
15+ call python -u " %~dp0 IBEX_upgrade.py" --release_dir " %SOURCE% " --release_suffix " %SUFFIX% " --confirm_step force_upgrade_mysql
1516
1617IF %errorlevel% neq 0 (
1718 set errcode = %ERRORLEVEL%
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ IF EXIST "C:\Instrument\Apps\EPICS\stop_ibex_server.bat" (
1212 start /wait cmd /c " C:\Instrument\Apps\EPICS\stop_ibex_server.bat"
1313)
1414
15+ call " %~dp0 _activate_venv.bat"
1516call " %LATEST_PYTHON% " " %~dp0 IBEX_upgrade.py" --kits_icp_dir " %KITS_ICP_PATH% " create_vhds --quiet --no_log_to_var
1617IF %ERRORLEVEL% NEQ 0 (
1718 set errcode = %ERRORLEVEL%
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ IF EXIST "C:\Instrument\Apps\EPICS\stop_ibex_server.bat" (
1111 start /wait cmd /c " C:\Instrument\Apps\EPICS\stop_ibex_server.bat"
1212)
1313
14- call " %LATEST_PYTHON% " " %~dp0 IBEX_upgrade.py" --kits_icp_dir " %KITS_ICP_PATH% " request_dismount_vhds --quiet --no_log_to_var
14+ call " %~dp0 _activate_venv.bat"
15+ call python " %~dp0 IBEX_upgrade.py" --kits_icp_dir " %KITS_ICP_PATH% " request_dismount_vhds --quiet --no_log_to_var
1516
1617IF %ERRORLEVEL% NEQ 0 (
1718 set errcode = %ERRORLEVEL%
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ IF EXIST "C:\Instrument\Apps\EPICS\stop_ibex_server.bat" (
1111 start /wait cmd /c " C:\Instrument\Apps\EPICS\stop_ibex_server.bat"
1212)
1313
14- call " %LATEST_PYTHON% " -u " %~dp0 IBEX_upgrade.py" --release_dir " %SOURCE% " create_vhds --quiet --no_log_to_var
14+ call " %~dp0 _activate_venv.bat"
15+ call python -u " %~dp0 IBEX_upgrade.py" --release_dir " %SOURCE% " create_vhds --quiet --no_log_to_var
1516
1617IF %ERRORLEVEL% NEQ 0 (
1718 set errcode = %ERRORLEVEL%
You can’t perform that action at this time.
0 commit comments