Merge #137 Files autodetection fixes
This commit is contained in:
commit
676ad35a1b
1 changed files with 3 additions and 4 deletions
|
@ -212,12 +212,11 @@ def get_license_files(path):
|
||||||
for root, dirs, files in os.walk(path, topdown=True):
|
for root, dirs, files in os.walk(path, topdown=True):
|
||||||
dirs[:] = [d for d in dirs if d not in exclude]
|
dirs[:] = [d for d in dirs if d not in exclude]
|
||||||
license_files.extend([os.path.relpath(os.path.join(root, f), path) for f in files if LICENSES.match(f)])
|
license_files.extend([os.path.relpath(os.path.join(root, f), path) for f in files if LICENSES.match(f)])
|
||||||
|
license_files.sort()
|
||||||
return license_files
|
return license_files
|
||||||
|
|
||||||
def get_doc_files(path):
|
def get_doc_files(path):
|
||||||
doc_files = []
|
doc_files = []
|
||||||
include = {"doc", "docs", "example", "examples", "_example", "_examples"}
|
|
||||||
exclude = {"vendor", ".github", "tests", "test", ".circleci"}
|
|
||||||
matcher = re.compile(
|
matcher = re.compile(
|
||||||
r"(.*\.md|.*\.markdown|.*\.mdown|.*\.mkdn|.*\.rst|.*\.txt|AUTHORS|"
|
r"(.*\.md|.*\.markdown|.*\.mdown|.*\.mkdn|.*\.rst|.*\.txt|AUTHORS|"
|
||||||
r"AUTHORS[\.\-].*|CONTRIBUTORS|CONTRIBUTORS[\.\-].*|README|"
|
r"AUTHORS[\.\-].*|CONTRIBUTORS|CONTRIBUTORS[\.\-].*|README|"
|
||||||
|
@ -225,9 +224,9 @@ def get_doc_files(path):
|
||||||
re.IGNORECASE)
|
re.IGNORECASE)
|
||||||
matcherex = re.compile(r"CMakeLists\.txt")
|
matcherex = re.compile(r"CMakeLists\.txt")
|
||||||
for root, dirs, files in os.walk(path, topdown=True):
|
for root, dirs, files in os.walk(path, topdown=True):
|
||||||
doc_files = doc_files + [d for d in dirs if d in include]
|
dirs[:] = []
|
||||||
dirs[:] = [d for d in dirs if d not in exclude]
|
|
||||||
doc_files.extend([os.path.relpath(os.path.join(root, f), path) for f in files if matcher.match(f) and not LICENSES.match(f) and not matcherex.match(f)])
|
doc_files.extend([os.path.relpath(os.path.join(root, f), path) for f in files if matcher.match(f) and not LICENSES.match(f) and not matcherex.match(f)])
|
||||||
|
doc_files.sort()
|
||||||
return doc_files
|
return doc_files
|
||||||
|
|
||||||
def make_diff_metadata(crate, version, patch=False, store=False):
|
def make_diff_metadata(crate, version, patch=False, store=False):
|
||||||
|
|
Loading…
Reference in a new issue