@@ -113,7 +113,6 @@ def update_download_stats(bundle_path):
113
113
with open (
114
114
os .path .join (bundle_path , "circuitpython_library_pypi_stats.md" ), "w"
115
115
) as md_file :
116
-
117
116
# Write headers
118
117
md_file .write ("\n " .join (lib_list_header ))
119
118
md_file .write ("\n " )
@@ -285,6 +284,7 @@ def update_bundle(bundle_path):
285
284
status = StringIO ()
286
285
git .status ("--short" , _out = status )
287
286
updates = []
287
+ release_required = False
288
288
status = status .getvalue ().strip ()
289
289
if status :
290
290
for status_line in status .split ("\n " ):
@@ -305,6 +305,7 @@ def update_bundle(bundle_path):
305
305
url = repo_remote_url (directory )
306
306
summary = "\n " .join (diff_lines [1 :- 1 ])
307
307
updates .append ((url [:- 4 ], old_commit , new_commit , summary ))
308
+ release_required = True
308
309
os .chdir (working_directory )
309
310
lib_list_updates = check_lib_links_md (bundle_path )
310
311
if lib_list_updates :
@@ -321,6 +322,7 @@ def update_bundle(bundle_path):
321
322
),
322
323
)
323
324
)
325
+ release_required = True
324
326
if update_download_stats (bundle_path ):
325
327
updates .append (
326
328
(
@@ -334,7 +336,7 @@ def update_bundle(bundle_path):
334
336
)
335
337
)
336
338
337
- return updates
339
+ return updates , release_required
338
340
339
341
340
342
def commit_updates (bundle_path , update_info ):
@@ -546,9 +548,9 @@ def new_release(bundle, bundle_path):
546
548
bundle_dir = os .path .join (bundles_dir , cp_bundle )
547
549
try :
548
550
fetch_bundle (cp_bundle , bundle_dir )
549
- updates_needed = update_bundle (bundle_dir )
550
- if updates_needed :
551
- commit_updates (bundle_dir , updates_needed )
551
+ updates , release_required = update_bundle (bundle_dir )
552
+ if release_required :
553
+ commit_updates (bundle_dir , updates )
552
554
push_updates (bundle_dir )
553
555
new_release (cp_bundle , bundle_dir )
554
556
except RuntimeError as e :
0 commit comments