diff --git a/uw_wcms_tools.gitlab.inc b/uw_wcms_tools.gitlab.inc index 1dca0774eb6a1a31ff52e6879ea8fcaead167f79..39b010ff6c253bfa99ccfcc14b6a4127b78965aa 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'] . '... ';