Skip to content

Commit 663d92e

Browse files
authored
ci(release_updater): some release_updater fixes and conf.defaults deprecated configs are non-fatal (#9076)
1 parent 8897282 commit 663d92e

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

‎scripts/generate_lv_conf.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def generate_config(path_destination: str, path_source: str, defaults: dict):
101101

102102
if len(keys_used) != len(defaults):
103103
unused_keys = [k for k in defaults.keys() if k not in keys_used]
104-
fatal('The following keys are deprecated:\n ' + '\n '.join(unused_keys))
104+
print('WARNING: The following keys are deprecated:\n ' + '\n '.join(unused_keys))
105105

106106
with open(path_destination, 'w', encoding='utf-8') as f_dst:
107107
for dst_line in dst_lines:

‎scripts/release_branch_updater.py‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def main():
8282

8383
branches_to_update = lvgl_release_branches
8484
if not skip_master:
85-
branches_to_update += [lvgl_default_branch]
85+
branches_to_update = branches_to_update + [lvgl_default_branch]
8686

8787
# from oldest to newest release...
8888
for lvgl_branch in branches_to_update:
@@ -151,19 +151,28 @@ def main():
151151
if "lvgl.path " in line
152152
), None)
153153

154+
# check if the submodule is really in the index and not just a leftover in .gitmodules
155+
out = subprocess.check_output(("git", "-C", port_clone_tmpdir, "submodule", "status"))
156+
if not any(
157+
line.split(maxsplit=1)[1].rsplit(maxsplit=1)[0] == port_lvgl_submodule_path
158+
for line
159+
in out.decode().strip().splitlines()
160+
):
161+
port_lvgl_submodule_path = None
162+
154163
if port_lvgl_submodule_path is None:
155164
print(LOG, "this port has no LVGL submodule")
156165
else:
157166
print(LOG, "lvgl submodule found in port at:", port_lvgl_submodule_path)
158167

159168
# get the SHA of LVGL in this release of LVGL
160-
out = subprocess.check_output(("git", "-C", lvgl_path, "rev-parse", "--verify", "--quiet", "HEAD"))
169+
out = subprocess.check_output(("git", "-C", lvgl_path, "rev-parse", "--verify", "HEAD"))
161170
lvgl_sha = out.decode().strip()
162171
print(LOG, "the SHA of LVGL in this release should be:", lvgl_sha)
163172

164173
# get the SHA of LVGL this port wants to use in this release
165174
out = subprocess.check_output(("git", "-C", port_clone_tmpdir, "rev-parse",
166-
"--verify", "--quiet", f"HEAD:{port_lvgl_submodule_path}"))
175+
"--verify", f"HEAD:{port_lvgl_submodule_path}"))
167176
port_lvgl_submodule_sha = out.decode().strip()
168177
print(LOG, "the SHA of LVGL in the submodule of this port is:", port_lvgl_submodule_sha)
169178

@@ -233,7 +242,7 @@ def main():
233242

234243
def get_release_branches(working_dir):
235244

236-
out = subprocess.check_output(("git", "-C", working_dir, "branch", "--quiet", "--format", "%(refname)", "--all"))
245+
out = subprocess.check_output(("git", "-C", working_dir, "branch", "--format", "%(refname)", "--all"))
237246
branches = out.decode().strip().splitlines()
238247

239248
release_versions = []

0 commit comments

Comments
 (0)