Skip to content
Snippets Groups Projects
Unverified Commit 8d63afb1 authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #8499 from Rylan12/copy-license-metafiles

metafiles: copy all license files
parents 9396ccf9 7c1af56e
No related branches found
No related tags found
No related merge requests found
......@@ -4,15 +4,13 @@
#
# @api private
module Metafiles
LICENSES = Set.new(%w[copying copyright license licence]).freeze
# https://github.com/github/markup#markups
EXTENSIONS = Set.new(%w[
.adoc .asc .asciidoc .creole .html .markdown .md .mdown .mediawiki .mkdn
.org .pod .rdoc .rst .rtf .textile .txt .wiki
]).freeze
BASENAMES = Set.new(%w[
about authors changelog changes copying copyright history license licence
news notes notice readme todo
]).freeze
BASENAMES = Set.new(%w[about authors changelog changes history news notes notice readme todo]).freeze
module_function
......@@ -24,6 +22,8 @@ module Metafiles
def copy?(file)
file = file.downcase
return true if LICENSES.include? file.split(".").first
ext = File.extname(file)
file = File.basename(file, ext) if EXTENSIONS.include?(ext)
BASENAMES.include?(file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment