Skip to content

Commit

Permalink
Merge pull request #211 from ISISComputingGroup/add_standalone_isisicp
Browse files Browse the repository at this point in the history
add standalone isisicp installer
  • Loading branch information
rerpha authored Nov 14, 2024
2 parents 1b7636e + 9e37dbc commit e6c057b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions installation_and_upgrade/ibex_install_utils/install_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ def run_instrument_install(self) -> None:
self._python_tasks.update_script_definitions()
self._server_tasks.setup_log_rotation()

def run_update_icp(self) -> None:
self._server_tasks.update_icp(self.icp_in_labview_modules())

def save_motor_params(self) -> None:
self._server_tasks.save_motor_parameters_to_file()

Expand Down Expand Up @@ -406,6 +409,10 @@ def run_vhd_post_install(self) -> None:
UpgradeInstrument.run_truncate_database,
"backup and truncate the sql database on the instrument",
),
"update_icp": (
UpgradeInstrument.run_update_icp,
"update isisicp on the instrument",
),
"force_upgrade_mysql": (
UpgradeInstrument.run_force_upgrade_mysql,
"upgrade mysql version to latest and recreate tables",
Expand Down
22 changes: 22 additions & 0 deletions installation_and_upgrade/update_icp.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
setlocal EnableDelayedExpansion
set "SOURCE=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases"
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.
goto ERROR
)

call "%LATEST_PYTHON%" "%~dp0IBEX_upgrade.py" --release_dir "%SOURCE%" --release_suffix "%SUFFIX%" --confirm_step update_icp
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!

0 comments on commit e6c057b

Please sign in to comment.