add path_match feature, allows us to make joomla detection much simpler
Hanno Böck

Hanno Böck commited on 2019-12-07 18:16:49
Zeige 1 geänderte Dateien mit 8 Einfügungen und 0 Löschungen.

... ...
@@ -144,6 +144,10 @@ for sect in config.sections():
144 144
         item['extra_nomatch'] = config.get(sect, 'extra_nomatch')
145 145
     else:
146 146
         item['extra_nomatch'] = False
147
+    if config.has_option(sect, 'path_match'):
148
+        item['path_match'] = config.get(sect, 'path_match')
149
+    else:
150
+        item['path_match'] = False
147 151
     if config.has_option(sect, 'add_minor'):
148 152
         item['add_minor'] = config.get(sect, 'add_minor')
149 153
     else:
... ...
@@ -183,6 +187,10 @@ for fdir in args:
183 187
                     else:
184 188
                         ematch = True
185 189
 
190
+                    if (item['path_match']
191
+                       and not root.endswith(item['path_match'])):
192
+                        continue
193
+
186 194
                     findversion = []
187 195
                     for var in item['variable']:
188 196
                         var = var.search(filestr)
189 197