Ensure we sanitize branch names with path-unfriendly characters

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2016-11-22 19:13:41 +01:00
parent b8980e89aa
commit cd78e02096
No known key found for this signature in database
GPG key ID: 46DF07E5CD9E96AB

View file

@ -149,7 +149,7 @@ module Gitlab
end
def ce_patch_name
@ce_patch_name ||= "#{ce_branch}.patch"
@ce_patch_name ||= patch_name_from_branch(ce_branch)
end
def ce_patch_full_path
@ -161,13 +161,17 @@ module Gitlab
end
def ee_patch_name
@ee_patch_name ||= "#{ee_branch}.patch"
@ee_patch_name ||= patch_name_from_branch(ee_branch)
end
def ee_patch_full_path
@ee_patch_full_path ||= patches_dir.join(ee_patch_name)
end
def patch_name_from_branch(branch_name)
branch_name.parameterize << '.patch'
end
def step(desc, cmd = nil)
puts "\n=> #{desc}\n"