Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticket7384 #132

Merged
merged 2 commits into from
Nov 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions installation_and_upgrade/IBEX_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def _get_latest_existing_dir_path(release_dir, component):
parser.add_argument("--quiet", default=False, action="store_true",
help="Do not ask any questions just to the default.")
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.")

deployment_types = [f"{choice}: {deployment_types}"
for choice, (_, deployment_types) in UPGRADE_TYPES.items()]
Expand All @@ -85,16 +86,22 @@ def _get_latest_existing_dir_path(release_dir, component):
current_client_version = _get_latest_release_path(args.release_dir).split("\\")[-1]
if args.release_suffix != "":
current_release_dir += f"-{args.release_suffix}"
DIRECTORIES["EPICS"] = os.path.join(current_release_dir, "EPICS")

server_32bit_suffix = "32" if args.server_arch == "x86" else ""
NikolaRoev marked this conversation as resolved.
Show resolved Hide resolved
DIRECTORIES["EPICS"] = os.path.join(current_release_dir, "EPICS" + server_32bit_suffix)
DIRECTORIES["Client"] = os.path.join(current_release_dir, "Client")
DIRECTORIES["genie_python_3"] = os.path.join(current_release_dir, "genie_python_3")

partial_release = False
for key in DIRECTORIES:
if not os.path.isdir(DIRECTORIES[key]):
partial_release = True
print(f"Warning: {key} is missing from release.")
DIRECTORIES[key] = _get_latest_existing_dir_path(args.release_dir, key)
if key == "EPICS":
print(f"Warning: {key + server_32bit_suffix} is missing from release.")
DIRECTORIES[key] = _get_latest_existing_dir_path(args.release_dir, key + server_32bit_suffix)
else:
print(f"Warning: {key} is missing from release.")
DIRECTORIES[key] = _get_latest_existing_dir_path(args.release_dir, key)

if partial_release:
try:
Expand Down