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

fix git status check #204

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Changes from all commits
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
14 changes: 3 additions & 11 deletions installation_and_upgrade/ibex_install_utils/tasks/git_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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}")