From c093dcb3536716d19e13af6ab91d15cfb37c27a1 Mon Sep 17 00:00:00 2001 From: Liam Morland Date: Mon, 21 Jun 2021 10:28:26 -0400 Subject: [PATCH] ISTWCMS-4802: Improve error message for projects that do not have a Drupal 8 branch --- uw_wcms_tools.gitlab.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uw_wcms_tools.gitlab.inc b/uw_wcms_tools.gitlab.inc index 1dca077..39b010f 100644 --- a/uw_wcms_tools.gitlab.inc +++ b/uw_wcms_tools.gitlab.inc @@ -831,7 +831,7 @@ function uw_wcms_tools_gitlab_tag_release(string $namespace, string $path): void echo uw_wcms_tools_shell_color("Merge done.\n", 'green'); } } - else { + elseif ($current_branches['rel'] && $current_branches['dev']) { echo 'Create ' . $current_branches['rel'] . ' from ' . $current_branches['dev'] . '... '; $params = [ 'branch' => $current_branches['rel'], @@ -847,6 +847,9 @@ function uw_wcms_tools_gitlab_tag_release(string $namespace, string $path): void throw new Exception('Branch creation failed.'); } } + else { + throw new Exception('Project does not have Drupal 8 or later version.'); + } // Create tag. echo 'Tag ' . $current_branches['rel'] . ' as ' . $current_branches['tag_next'] . '... '; -- GitLab