Commit 37e3f207 authored by Andreas Brandl's avatar Andreas Brandl

Choose shortest match for CE branch in ee-files-location-check.

Closes #5271.
parent 5ea0fbfc
...@@ -32,7 +32,7 @@ branch_to_fetch = 'master' ...@@ -32,7 +32,7 @@ branch_to_fetch = 'master'
if ls_remote_output.include?(minimal_ce_branch_name) if ls_remote_output.include?(minimal_ce_branch_name)
remote_to_fetch = ce_repo_url remote_to_fetch = ce_repo_url
branch_to_fetch = ls_remote_output.split("refs/heads/").last.strip branch_to_fetch = ls_remote_output.scan(%r{(?<=refs/heads/).+}).sort_by(&:size).first
puts puts
puts "💪 We found the branch '#{branch_to_fetch}' in the #{ce_repo_url} repository. We will fetch it." puts "💪 We found the branch '#{branch_to_fetch}' in the #{ce_repo_url} repository. We will fetch it."
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment