Skip to content

Commit

Permalink
Merge pull request #214 from ISISComputingGroup/Ticket8576_vc_redist_…
Browse files Browse the repository at this point in the history
…install

Ticket8576 vc redist install
  • Loading branch information
iangillingham-stfc authored Dec 19, 2024
2 parents 49bdd9e + ded1e34 commit 40fbfd5
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 61 deletions.
18 changes: 12 additions & 6 deletions installation_and_upgrade/IBEX_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
import re
import sys

import semantic_version
import ibex_install_utils.default_args
import semantic_version # pyright: ignore
from ibex_install_utils.exceptions import ErrorInTask, UserStop
from ibex_install_utils.file_utils import FileUtils
from ibex_install_utils.install_tasks import UPGRADE_TYPES, UpgradeInstrument
from ibex_install_utils.logger import Logger
from ibex_install_utils.user_prompt import UserPrompt


def _get_latest_release_path(release_dir):
def _get_latest_release_path(release_dir: str) -> str:
regex = re.compile(r"^\d+\.\d+\.\d+$")

releases = [
Expand All @@ -31,7 +32,7 @@ def _get_latest_release_path(release_dir):
return os.path.join(release_dir, f"{current_release}")


def _get_latest_existing_dir_path(release_dir, component):
def _get_latest_existing_dir_path(release_dir: str, component: str) -> str:
regex = re.compile(r"^\d+\.\d+\.\d+$")

releases = [
Expand Down Expand Up @@ -108,7 +109,10 @@ def _get_latest_existing_dir_path(release_dir, component):
)
parser.add_argument("--kits_icp_dir", default=None, help="Directory of kits/ICP")
parser.add_argument(
"--server_arch", default="x64", choices=["x64", "x86"], help="Server build architecture."
"--server_arch",
default=ibex_install_utils.default_args.SERVER_ARCH,
choices=["x64", "x86"],
help="Server build architecture.",
)

deployment_types = [
Expand All @@ -122,6 +126,8 @@ def _get_latest_existing_dir_path(release_dir, component):

args = parser.parse_args()

ibex_install_utils.default_args.SERVER_ARCH = args.server_arch

if not args.no_log_to_var:
Logger.set_up()

Expand Down Expand Up @@ -165,8 +171,8 @@ def _get_latest_existing_dir_path(release_dir, component):
)
except UserStop:
print(
"To specify the directory you want use --server_dir, --client_dir, and --genie_python3_dir "
"when running the IBEX_upgrade.py script."
"To specify the directory you want use --server_dir, --client_dir, and"
" --genie_python3_dir when running the IBEX_upgrade.py script."
)
sys.exit(2)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SERVER_ARCH = "x64"
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def run_instrument_deploy_main(self) -> None:
self._server_tasks.update_icp(self.icp_in_labview_modules())
self._python_tasks.install_genie_python3()
self._mysql_tasks.install_mysql()
self._system_tasks.install_or_upgrade_vc_redist()

self._client_tasks.install_ibex_client()
self._git_tasks.checkout_to_release_branch()
Expand Down
Loading

0 comments on commit 40fbfd5

Please sign in to comment.