ci(release_updater): Add bi-weekly schedule. Only update master branches on schedule (#8074)

This commit is contained in:
Liam Howatt
2025-04-15 22:40:21 +02:00
committed by GitHub
parent db11b1efbe
commit 8f94109d98
2 changed files with 22 additions and 6 deletions
+11 -5
View File
@@ -26,6 +26,7 @@ def main():
arg_parser.add_argument("--dry-run", action="store_true")
arg_parser.add_argument("--oldest-major", type=int)
arg_parser.add_argument("--github-token", type=str)
arg_parser.add_argument("--skip-master", action="store_true")
args = arg_parser.parse_args()
@@ -34,6 +35,7 @@ def main():
lvgl_path = args.lvgl_path
dry_run = args.dry_run
oldest_major = args.oldest_major
skip_master = args.skip_master
if not args.github_token and not dry_run:
print(LOG, "Warning: No github token was provided for this production run. Continuing anyway...")
@@ -78,8 +80,12 @@ def main():
# 2. update the LVGL submodule to match the LVGL's release branch version
# 3. update the lv_conf.h based on the lv_conf.defaults
branches_to_update = lvgl_release_branches
if not skip_master:
branches_to_update += [lvgl_default_branch]
# from oldest to newest release...
for lvgl_branch in lvgl_release_branches + [lvgl_default_branch]:
for lvgl_branch in branches_to_update:
if isinstance(lvgl_branch, tuple):
port_branch = lvgl_branch
print(LOG, f"attempting to update release branch {fmt_release(port_branch)} ...")
@@ -204,10 +210,10 @@ def main():
if port_does_not_have_the_branch or port_submodule_was_updated or port_lv_conf_h_was_updated:
print(LOG, "changes were made. ready to push.")
# keep it brief for commit message 50 character limit suggestion.
# max length will be 50 characters in this case: "CI release edit: new branch. submodule. lv_conf.h."
commit_msg = ("CI release edit:"
+ (" new branch." if port_does_not_have_the_branch else "")
+ (" submodule." if port_submodule_was_updated else "")
# max length will be 50 characters in this case: "bot: New branch. Update LVGL submodule. lv_conf.h."
commit_msg = ("bot:"
+ (" New branch." if port_does_not_have_the_branch else "")
+ (" Update LVGL submodule." if port_submodule_was_updated else "")
+ (" lv_conf.h." if port_lv_conf_h_was_updated else "")
)
print(LOG, f"commit message: '{commit_msg}'")