Commit a7234294 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'ab-5271-fix-ee-files-location-check' into 'master'

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

Closes #5271

See merge request gitlab-org/gitlab-ee!4968
parents 695b95c0 37e3f207
......@@ -32,7 +32,7 @@ branch_to_fetch = 'master'
if ls_remote_output.include?(minimal_ce_branch_name)
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 "💪 We found the branch '#{branch_to_fetch}' in the #{ce_repo_url} repository. We will fetch it."
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