Skip to content

Commit b8a6aa2

Browse files
committed
Fixed example project not generating
This fixes exampe directories being ignored even in the example project.
1 parent 85ae236 commit b8a6aa2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

credits.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def plist_from_dirs(directories, excludes, include_tests):
107107
plist = {'PreferenceSpecifiers': [], 'StringsTable': 'Acknowledgements'}
108108
for directory in directories:
109109
license_paths = license_paths_from_dir(directory)
110-
plist_paths = [plist_path for plist_path in license_paths if not exclude_path(plist_path, excludes, include_tests)]
110+
plist_paths = [plist_path for plist_path in license_paths if not exclude_path(directory, plist_path, excludes, include_tests)]
111111
for plist_path in plist_paths:
112112
license_dict = plist_from_file(plist_path)
113113
plist['PreferenceSpecifiers'].append(license_dict)
@@ -145,16 +145,16 @@ def plist_from_file(path):
145145
return group
146146

147147

148-
def exclude_path(path, excludes, is_testing):
149-
if "/LicenseGenerator-iOS/Example/" in path:
148+
def exclude_path(source_path, plist_path, excludes, is_testing):
149+
if "/LicenseGenerator-iOS/Example/" in plist_path and '/LicenseGenerator-iOS/Example/Pods' not in source_path:
150150
return True
151-
elif "/LicenseGenerator-iOS/Tests/" in path:
151+
elif "/LicenseGenerator-iOS/Tests/" in plist_path:
152152
return not is_testing
153153
elif excludes is None:
154154
return False
155155

156156
for pattern in excludes:
157-
if re.search(pattern.strip(), path, re.S) is not None:
157+
if re.search(pattern.strip(), plist_path, re.S) is not None:
158158
return True
159159
return False
160160

0 commit comments

Comments
 (0)