From 629802f7183c5b94800fa437b396168ed8af1cb4 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 28 Aug 2024 16:43:44 +0100 Subject: [PATCH] fix git status check --- .../ibex_install_utils/tasks/git_tasks.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/installation_and_upgrade/ibex_install_utils/tasks/git_tasks.py b/installation_and_upgrade/ibex_install_utils/tasks/git_tasks.py index 37a77fd..382d266 100644 --- a/installation_and_upgrade/ibex_install_utils/tasks/git_tasks.py +++ b/installation_and_upgrade/ibex_install_utils/tasks/git_tasks.py @@ -8,11 +8,11 @@ class GitTasks(BaseTasks): @task(f"Show Git status in {EPICS_PATH}") - def show_git_status(self): - subprocess.call(f"cd {EPICS_PATH} && git status", shell=True) + def show_git_status(self) -> None: + subprocess.call(f"cd /d {EPICS_PATH} && git status", shell=True) @task("Swap instrument git branch to release on CONTROL-SVCS") - def checkout_to_release_branch(self): + def checkout_to_release_branch(self) -> None: version_pattern = r"^\d+\.\d+\.\d+$" if self._server_source_dir.endswith("32"): remote_repo = "EPICS32.git" @@ -61,11 +61,3 @@ def checkout_to_release_branch(self): except subprocess.CalledProcessError as e: print(f"Error checking out to new release branch and push: {e}") print("Branch may previously exist either locally or remotely - intervention required") - - -# something for the future in case creting new beranch fails - maybe one exists we want to use? -# try: -# subprocess.check_call(f"cd {EPICS_PATH} && git checkout %COMPUTERNAME%", shell=True) -# print("Switched to existing release branch") -# except subprocess.CalledProcessError as e: -# print(f"Error switching to existing release branch and push: {e}")