Commit c1975769 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'ap-rubocop-docs-raketask' into 'master'

Refactor docs raketask to use next unless

See merge request gitlab-org/gitlab!62497
parents b2ecff35 4c332ca9
......@@ -112,13 +112,12 @@ namespace :gitlab do
# The remove_date of redirects.yaml should be nine months in the future.
# To not be confused with the remove_date of the Markdown page.
#
if remove_date < today
File.delete(filename) if File.exist?(filename)
next unless remove_date < today
puts " - from: #{old_path}"
puts " to: #{new_path(frontmatter['redirect_to'], filename)}"
puts " remove_date: #{remove_date >> 9}"
end
File.delete(filename) if File.exist?(filename)
puts " - from: #{old_path}"
puts " to: #{new_path(frontmatter['redirect_to'], filename)}"
puts " remove_date: #{remove_date >> 9}"
end
end
end
......
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