From e5625fdf3d5f0306cca6986ca33efc50d7493a9b Mon Sep 17 00:00:00 2001 From: Alexis Lucattini Date: Mon, 24 Jun 2024 16:14:58 +1000 Subject: [PATCH] Fixes to create workflow release command and upgrade icav2 cli plugin versions --- Dockerfile | 2 +- .../subcommands/creators/create_workflow_release.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2076fac..6ac0e2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ ARG CONDA_USER_ID=1000 ARG CONDA_ENV_NAME="cwl-ica" ARG YQ_VERSION="v4.35.2" ARG ICAV2_CLI_VERSION="2.26.0" -ARG ICAV2_PLUGINS_CLI_VERSION="v2.27.0.dev20240624111939" +ARG ICAV2_PLUGINS_CLI_VERSION="v2.27.0.dev20240624161340" ARG ICAV2_PLUGINS_CLI_CONDA_PYTHON_VERSION="3.12" ARG ICAV2_PLUGINS_CLI_CONDA_ENV_NAME="python3.12" ARG CURL_VERSION="7.81.0" diff --git a/src/cwl_ica/subcommands/creators/create_workflow_release.py b/src/cwl_ica/subcommands/creators/create_workflow_release.py index 4eb9c11..693a916 100644 --- a/src/cwl_ica/subcommands/creators/create_workflow_release.py +++ b/src/cwl_ica/subcommands/creators/create_workflow_release.py @@ -117,7 +117,8 @@ def git_checks(self): get_branch_name_returncode, get_branch_name_stdout, get_branch_name_stderr = run_subprocess_proc( [ "git", "rev-parse", "--abbrev-ref", "HEAD" - ] + ], + capture_output=True ) if get_branch_name_returncode != 0: logger.error("Please ensure you are on the main branch before continuing") @@ -131,16 +132,16 @@ def git_checks(self): raise CheckArgumentError # Check we're in sync with the remote branch - get_remote_branch_proc = run_subprocess_proc( + get_remote_branch_returncode, get_remote_branch_stdout, get_remote_branch_stderr = run_subprocess_proc( [ "git", "rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}" ], capture_output=True ) - if get_remote_branch_proc.returncode != 0: + if get_remote_branch_returncode != 0: logger.error("Could not get the upstream branch for this ") raise CheckArgumentError - remote_branch = get_remote_branch_proc.stdout.strip() + remote_branch = get_remote_branch_stdout.strip() # Check diffs between remote and local diff_returncode, diff_stdout, diff_stderr = run_subprocess_proc( @@ -157,7 +158,7 @@ def generate_tag(self): logger.info("Generating tag") tag_returncode, tag_stdout, tag_stderr = run_subprocess_proc( [ - "git", "tag", self.tag + "git", "tag", "--force", self.tag ], capture_output=True ) @@ -174,7 +175,7 @@ def __call__(self): logger.info(f"Pushing tag {self.tag}") push_tag_returncode, push_tag_stdout, push_tag_stderr = run_subprocess_proc( [ - "git", "push", "origin", self.tag + "git", "push", "origin", "--force", self.tag ], capture_output=True )