-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update scripts to install/remove python on run
- Loading branch information
1 parent
6c7a36b
commit 6724329
Showing
16 changed files
with
135 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
setlocal | ||
call "%~dp0..\installation_and_upgrade\define_latest_genie_python.bat" 3 | ||
call "%~dp0..\installation_and_upgrade\define_latest_genie_python.bat" | ||
set PYTHONUNBUFFERED=TRUE | ||
REM use LATEST_PYTHON3 so not killed by stop_ibex_server | ||
call "%LATEST_PYTHON3%" -u "%~dp0check_builds_are_recent.py" | ||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
setlocal | ||
setlocal EnableDelayedExpansion | ||
set "SOURCE=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases" | ||
call "%~dp0\define_latest_genie_python.bat" | ||
call "%~dp0define_latest_genie_python.bat" | ||
|
||
set "STOP_IBEX=C:\Instrument\Apps\EPICS\stop_ibex_server" | ||
set "START_IBEX=C:\Instrument\Apps\EPICS\start_ibex_server" | ||
|
||
start /wait cmd /c "%STOP_IBEX%" | ||
|
||
call "%LATEST_PYTHON%" "%~dp0IBEX_upgrade.py" --release_dir "%SOURCE%" --release_suffix "%SUFFIX%" --confirm_step developer_update | ||
IF ERRORLEVEL 1 EXIT /b %errorlevel% | ||
IF ERRORLEVEL 1 ( | ||
set errcode = %ERRORLEVEL% | ||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
EXIT /b !errcode! | ||
) | ||
|
||
start /wait cmd /c "%START_IBEX%" | ||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
set "SOURCE=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases" | ||
call "%~dp0\define_latest_genie_python.bat" | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
call "%~dp0define_latest_genie_python.bat" | ||
if %errorlevel% neq 0 goto ERROR | ||
|
||
call "%LATEST_PYTHON%" "%~dp0IBEX_upgrade.py" --release_dir "%SOURCE%" --confirm_step instrument_test | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
if %errorlevel% neq 0 goto ERROR | ||
|
||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
exit /b 0 | ||
|
||
:ERROR | ||
set errcode = %ERRORLEVEL% | ||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
EXIT /b !errcode! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
setlocal | ||
call "%~dp0\define_latest_genie_python.bat" | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
call "%~dp0define_latest_genie_python.bat" | ||
if %errorlevel% neq 0 goto ERROR | ||
set "SOURCE=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases\4.0.0" | ||
|
||
set "STOP_IBEX=C:\Instrument\Apps\EPICS\stop_ibex_server" | ||
set "START_IBEX=C:\Instrument\Apps\EPICS\start_ibex_server" | ||
IF EXIST "C:\Instrument\Apps\EPICS" (start /wait cmd /c "%STOP_IBEX%") | ||
|
||
call "%LATEST_PYTHON%" "%~dp0IBEX_upgrade.py" --release_dir "%SOURCE%" --confirm_step instrument_update | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
|
||
if %errorlevel% neq 0 goto ERROR | ||
start /wait cmd /c "%START_IBEX%" | ||
|
||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
exit /b 0 | ||
|
||
:ERROR | ||
set errcode = %ERRORLEVEL% | ||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
EXIT /b !errcode! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
@ECHO OFF | ||
setlocal | ||
set "SOURCE=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases" | ||
call "%~dp0\define_latest_genie_python.bat" | ||
call "%~dp0define_latest_genie_python.bat" | ||
call cd "%~dp0" | ||
set PYTHONPATH=. | ||
@REM Uses Python from the Shares, set as LATEST_PYTHON | ||
call "%LATEST_PYTHON%" "%~dp0ibex_install_utils\tasks\backup_tasks.py" | ||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
endlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
setlocal | ||
setlocal EnableDelayedExpansion | ||
set "SOURCE=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases" | ||
call "%~dp0\define_latest_genie_python.bat" | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
call "%~dp0define_latest_genie_python.bat" | ||
IF %errorlevel% neq 0 goto ERROR | ||
|
||
call "%LATEST_PYTHON%" "%~dp0IBEX_upgrade.py" --release_dir "%SOURCE%" --confirm_step save_motor_params | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
|
||
IF %errorlevel% neq 0 goto ERROR | ||
|
||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
exit /b 0 | ||
|
||
:ERROR | ||
set errcode = %ERRORLEVEL% | ||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
EXIT /b !errcode! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
setlocal EnableDelayedExpansion | ||
set "SOURCE=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases" | ||
call "%~dp0\define_latest_genie_python.bat" | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
call "%~dp0define_latest_genie_python.bat" | ||
IF %errorlevel% neq 0 goto ERROR | ||
|
||
git --version | ||
|
||
IF %errorlevel% neq 0 ( | ||
echo No installation of Git found on machine. Please download Git from https://git-scm.com/downloads before proceeding. | ||
EXIT /b %errorlevel% | ||
goto ERROR | ||
) | ||
|
||
call "%LATEST_PYTHON%" "%~dp0IBEX_upgrade.py" --release_dir "%SOURCE%" --release_suffix "%SUFFIX%" --confirm_step truncate_database | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
IF %errorlevel% neq 0 goto ERROR | ||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
|
||
exit /b 0 | ||
|
||
:ERROR | ||
set errcode = %ERRORLEVEL% | ||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
EXIT /b !errcode! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
setlocal EnableDelayedExpansion | ||
set PYTHONUNBUFFERED=1 | ||
set "SOURCE=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases" | ||
call "%~dp0\define_latest_genie_python.bat" | ||
call "%~dp0define_latest_genie_python.bat" | ||
|
||
IF EXIST "C:\Instrument\Apps\EPICS\stop_ibex_server.bat" ( | ||
start /wait cmd /c "C:\Instrument\Apps\EPICS\stop_ibex_server.bat" | ||
) | ||
|
||
call "%LATEST_PYTHON%" "%~dp0IBEX_upgrade.py" --kits_icp_dir "%KITS_ICP_PATH%" create_vhds --quiet --no_log_to_var | ||
IF %ERRORLEVEL% NEQ 0 EXIT /b %errorlevel% | ||
IF %ERRORLEVEL% NEQ 0 ( | ||
set errcode = %ERRORLEVEL% | ||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
EXIT /b !errcode! | ||
) | ||
|
||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
setlocal EnableDelayedExpansion | ||
set PYTHONUNBUFFERED=1 | ||
set "SOURCE=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases" | ||
call "%~dp0\define_latest_genie_python.bat" | ||
call "%~dp0define_latest_genie_python.bat" | ||
|
||
IF EXIST "C:\Instrument\Apps\EPICS\stop_ibex_server.bat" ( | ||
start /wait cmd /c "C:\Instrument\Apps\EPICS\stop_ibex_server.bat" | ||
) | ||
|
||
call "%LATEST_PYTHON%" "%~dp0IBEX_upgrade.py" --kits_icp_dir "%KITS_ICP_PATH%" request_dismount_vhds --quiet --no_log_to_var | ||
IF %ERRORLEVEL% NEQ 0 EXIT /b %errorlevel% | ||
|
||
IF %ERRORLEVEL% NEQ 0 ( | ||
set errcode = %ERRORLEVEL% | ||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
EXIT /b !errcode! | ||
) | ||
|
||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
setlocal | ||
setlocal EnableDelayedExpansion | ||
set PYTHONUNBUFFERED=1 | ||
set "SOURCE=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases" | ||
call "%~dp0\define_latest_genie_python.bat" | ||
call "%~dp0define_latest_genie_python.bat" | ||
|
||
IF EXIST "C:\Instrument\Apps\EPICS\stop_ibex_server.bat" ( | ||
start /wait cmd /c "C:\Instrument\Apps\EPICS\stop_ibex_server.bat" | ||
) | ||
|
||
call "%LATEST_PYTHON%" -u "%~dp0IBEX_upgrade.py" --release_dir "%SOURCE%" create_vhds --quiet --no_log_to_var | ||
IF %ERRORLEVEL% NEQ 0 EXIT /b %errorlevel% | ||
|
||
IF %ERRORLEVEL% NEQ 0 ( | ||
set errcode = %ERRORLEVEL% | ||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% | ||
EXIT /b !errcode! | ||
) | ||
|
||
call "%~dp0remove_genie_python.bat" %LATEST_PYTHON_DIR% |