@@ -269,6 +269,16 @@ def repo_remote_url(repo_path):
269
269
270
270
def update_bundle (bundle_path ):
271
271
"""Process all libraries in the bundle, and update their version if necessary."""
272
+
273
+ if (
274
+ "Adafruit_CircuitPython_Bundle" not in bundle_path
275
+ and "CircuitPython_Community_Bundle" not in bundle_path
276
+ ):
277
+ raise ValueError (
278
+ "bundle_path must be for "
279
+ "Adafruit_CircuitPython_Bundle or CircuitPython_Community_Bundle"
280
+ )
281
+
272
282
working_directory = os .path .abspath (os .getcwd ())
273
283
os .chdir (bundle_path )
274
284
git .submodule ("foreach" , "git" , "fetch" )
@@ -312,12 +322,15 @@ def update_bundle(bundle_path):
312
322
os .chdir (working_directory )
313
323
lib_list_updates = check_lib_links_md (bundle_path )
314
324
if lib_list_updates :
325
+ if "Adafruit_CircuitPython_Bundle" in bundle_path :
326
+ listfile_name = "circuitpython_library_list.md"
327
+ bundle_url = "https://github.com/adafruit/Adafruit_CircuitPython_Bundle/"
328
+ elif "CircuitPython_Community_Bundle" in bundle_path :
329
+ listfile_name = "circuitpython_community_auto_library_list.md"
330
+ bundle_url = "https://github.com/adafruit/CircuitPython_Community_Bundle/"
315
331
updates .append (
316
332
(
317
- (
318
- "https://github.com/adafruit/Adafruit_CircuitPython_Bundle/"
319
- "circuitpython_library_list.md"
320
- ),
333
+ f"{ bundle_url } { listfile_name } " , # pylint: disable=possibly-used-before-assignment
321
334
"NA" ,
322
335
"NA" ,
323
336
" > Added the following libraries: {}" .format (
@@ -326,18 +339,6 @@ def update_bundle(bundle_path):
326
339
)
327
340
)
328
341
release_required = True
329
- if update_download_stats (bundle_path ):
330
- updates .append (
331
- (
332
- (
333
- "https://github.com/adafruit/Adafruit_CircuitPython_Bundle/"
334
- "circuitpython_library_list.md"
335
- ),
336
- "NA" ,
337
- "NA" ,
338
- " > Updated download stats for the libraries" ,
339
- )
340
- )
341
342
342
343
return updates , release_required
343
344
0 commit comments